diff options
author | Jan Macku <jamacku@redhat.com> | 2020-11-05 14:51:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 14:51:33 +0100 |
commit | 7d876f7ac28151d754aafbe5d008c9a4b574e211 (patch) | |
tree | ca331d9fe4cf801c984c2cea3a6725e6ed480199 /network-scripts/ifup-ippp | |
parent | 9b0651b14849046303cd635648212d6ba8dc619f (diff) | |
download | initscripts-7d876f7ac28151d754aafbe5d008c9a4b574e211.tar initscripts-7d876f7ac28151d754aafbe5d008c9a4b574e211.tar.gz initscripts-7d876f7ac28151d754aafbe5d008c9a4b574e211.tar.bz2 initscripts-7d876f7ac28151d754aafbe5d008c9a4b574e211.tar.xz initscripts-7d876f7ac28151d754aafbe5d008c9a4b574e211.zip |
network-scripts: Use net_log() instead of logger
Use internal network-scripts function net_log() instead of
/usr/bin/logger if possible to make code more consistent and cleaner.
Diffstat (limited to 'network-scripts/ifup-ippp')
-rwxr-xr-x | network-scripts/ifup-ippp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/network-scripts/ifup-ippp b/network-scripts/ifup-ippp index b8df7c07..09214275 100755 --- a/network-scripts/ifup-ippp +++ b/network-scripts/ifup-ippp @@ -30,20 +30,20 @@ fi # check that ipppd is available for syncppp if [ "$ENCAP" = "syncppp" ]; then if [ ! -x /sbin/ipppd ] && [ ! -x /usr/sbin/ipppd ] ; then - /usr/bin/logger -p daemon.info -t ifup-ippp "ipppd does not exist or is not executable" + net_log $"ipppd does not exist or is not executable" info ifup-ippp exit 1 fi fi # check that isdnctrl is available if [ ! -x /sbin/isdnctrl ] && [ ! -x /usr/sbin/isdnctrl ] ; then - /usr/bin/logger -p daemon.info -t ifup-ippp "isdnctrl does not exist or is not executable" + net_log $"isdnctrl does not exist or is not executable" info ifup-ippp exit 1 fi # check all ISDN devices if ! isdnctrl list all >/dev/null 2>&1 ; then - /usr/bin/logger -p daemon.info -t ifup-ippp "cannot list ISDN devices" + net_log $"cannot list ISDN devices" info ifup-ippp exit 1 fi @@ -52,12 +52,12 @@ isdnctrl list $DEVICE >/dev/null 2>&1 && exit 0 function log_echo() { - /usr/bin/logger -p daemon.info -t ifup-ippp $"$*" + net_log $"$*" info ifup-ippp } function log_isdnctrl() { - /usr/bin/logger -p daemon.info -t ifup-ippp isdnctrl $* + net_log $"$*" info ifup-ippp isdnctrl $* >/dev/null 2>&1 || exit 1 } @@ -340,13 +340,13 @@ function addprovider() pfx=${val##PREFIX=} } # activate ISDN device - /usr/bin/logger -p daemon.info -t ifup-ippp "ip addr add $IPADDR peer $GATEWAY${pfx:/$pfx} dev $DEVICE" + net_log $"ip addr add $IPADDR peer $GATEWAY${pfx:/$pfx} dev $DEVICE" info ifup-ippp ip addr add $IPADDR peer $GATEWAY${pfx:/$pfx} dev $DEVICE ip link set dev $DEVICE up if [ "$ENCAP" = "syncppp" ]; then # start ipppd daemon - /usr/bin/logger -p daemon.info -t ifup-ippp "ipppd $options $netmask" + net_log $"ipppd $options $netmask" info ifup-ippp ipppd $options $netmask >/dev/null 2>&1 # start ibod daemon |