aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-03-25 15:58:16 -0400
committerBill Nottingham <notting@redhat.com>2011-03-25 15:58:16 -0400
commit579c34c464ff22339c76bfbf51ce122a8961c0fc (patch)
tree414c9e507be8de98d4d093af69be8f5c6b6e5970 /sysconfig/network-scripts
parentac1bb973ece7e34f2f9a1606f4b9559e48b2e131 (diff)
downloadinitscripts-579c34c464ff22339c76bfbf51ce122a8961c0fc.tar
initscripts-579c34c464ff22339c76bfbf51ce122a8961c0fc.tar.gz
initscripts-579c34c464ff22339c76bfbf51ce122a8961c0fc.tar.bz2
initscripts-579c34c464ff22339c76bfbf51ce122a8961c0fc.tar.xz
initscripts-579c34c464ff22339c76bfbf51ce122a8961c0fc.zip
Make net_log()'s output similar to that of the ipv6 logger.
This will cause output strings to change, of course, so it's not really appropriate for earlier releases.
Diffstat (limited to 'sysconfig/network-scripts')
-rw-r--r--sysconfig/network-scripts/network-functions17
1 files changed, 16 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions
index ed318b0e..14d13fee 100644
--- a/sysconfig/network-scripts/network-functions
+++ b/sysconfig/network-scripts/network-functions
@@ -440,7 +440,22 @@ net_log() {
[ -z "$level" ] && level=info
[ -z "$name" ] && name=$0
- echo $message
+ case $level in
+ 'debug')
+ local txt_level=$"DEBUG "
+ ;;
+ 'err')
+ local txt_level=$"ERROR "
+ ;;
+ 'warning')
+ local txt_level=$"WARN "
+ ;;
+ 'info')
+ local txt_level=$"INFO "
+ ;;
+ esac
+
+ echo "$txt_level: [$name] $message"
if [ -x /usr/bin/logger ]; then
/usr/bin/logger -p daemon.$level -t "$name" "$message"