Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > media > contrib-release > by-pkgid > cc14d3b322fcecbf4f91aaca8a545978 > scriptlet

guarddog-2.5.0-1mdk.i586.rpm

POSTIN

/bin/sh
if [ -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi 



if [ ! -e /etc/rc.firewall ]; then
  echo "#!/bin/sh" > /etc/rc.firewall
  echo "# This is just a place holder rc.firewall file so that when the links" >> /etc/rc.firewall
  echo "# /sbin/ifup-local and /sbin/ifdown-local have something valid to  point to." >> /etc/rc.firewall
  echo "# It will be over written once the Guarddog configuration utility is used." >> /etc/rc.firewall
  echo "# --Guarddog, http://www.simonzone.com/software/guarddog/" >> /etc/rc.firewall
  chmod u+x /etc/rc.firewall
fi

if [ ! -e /etc/sysconfig/network-scripts/ifup.d/10Guarddog ]; then
  /bin/ln -s /etc/rc.firewall /etc/sysconfig/network-scripts/ifup.d/10Guarddog
fi
if [ ! -e /etc/sysconfig/network-scripts/ifdown.d/10Guarddog ]; then
  /bin/ln -s /etc/rc.firewall /etc/sysconfig/network-scripts/ifdown.d/10Guarddog
fi

# Cleanup stuff from previous Guarddog installs.
if [ -L /sbin/ifup-local ]; then
  if [ `/usr/bin/readlink /sbin/ifup-local` == /etc/rc.firewall ]; then
    /bin/rm /sbin/ifup-local
  fi
fi
if [ -L /sbin/ifdown-local ]; then
  if [ `/usr/bin/readlink /sbin/ifdown-local` == /etc/rc.firewall ]; then
    /bin/rm /sbin/ifdown-local
  fi
fi
if [ -e /etc/ppp/ip-up.local ]; then
  if [ 0 -ne `/bin/grep -c /etc/rc.firewall /etc/ppp/ip-up.local` ]; then
    /bin/rm /etc/ppp/ip-up.local
  fi
fi
if [ -e /etc/ppp/ip-down.local ]; then
  if [ 0 -ne `/bin/grep -c /etc/rc.firewall /etc/ppp/ip-down.local` ]; then
    /bin/rm /etc/ppp/ip-down.local
  fi
fi

POSTUN

/bin/sh
if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi