- Rewrote initscript to match LSB standards and headers (#246903) - Added dispatcher to NetworkManager to avoid failures (#506286)
15 lines
360 B
Bash
15 lines
360 B
Bash
#!/bin/sh
|
|
|
|
export LC_ALL=C
|
|
|
|
if [ "$2" = "down" ]; then
|
|
/sbin/ip route ls | grep -q '^default' || {
|
|
[ -f /var/lock/subsys/ddclient ] && /sbin/service ddclient stop || :
|
|
} && { :; }
|
|
fi
|
|
|
|
if [ "$2" = "up" ]; then
|
|
/sbin/ip -o route show dev "$1" | grep -q '^default' && {
|
|
/sbin/chkconfig ddclient && /sbin/service ddclient start || :
|
|
} || { :; }
|
|
fi
|