Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > e84a17800acbf7058e0e7c498ec6be50 > files > 4

ddclient-3.8.2-3.1.mga5.src.rpm

#!/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