Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > ca6a9b3986c7baddf95fb2edb4ab0bb6 > scriptlet

guarddog-1.9.12-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 [ ! -x /sbin/ifup-local ]; then
  ln -s /etc/rc.firewall /sbin/ifup-local
else
  echo "*** Warning: Could not make a link from /sbin/ifup-local to /etc/rc.firewall ***"
fi
if [ ! -x /sbin/ifdown-local ]; then
  ln -s /etc/rc.firewall /sbin/ifdown-local
else
  echo "*** Warning: Could not make a link from /sbin/ifdown-local to /etc/rc.firewall ***"
fi

if [ ! -e /etc/ppp/ip-up.local ]; then
  echo "#!/bin/bash" > /etc/ppp/ip-up.local
  echo "#" >> /etc/ppp/ip-up.local
  echo "# This short script just runs any firewall script located at /etc/rc.firewall ." >> /etc/ppp/ip-up.local
  echo "# It will be called whenever a ppp interface comes up. Normally we would hook" >> /etc/ppp/ip-up.local
  echo "# our firewall script in via /sbin/ifup-local, but a bug in the" >> /etc/ppp/ip-up.local
  echo "# /etc/ppp/ip-up script prevents that from working. This script provides a" >> /etc/ppp/ip-up.local
  echo "# workaround." >> /etc/ppp/ip-up.local
  echo "#" >> /etc/ppp/ip-up.local
  echo "# cheers, Guardddog http://www.simonzone.com/software/guarddog/" >> /etc/ppp/ip-up.local
  echo "#" >> /etc/ppp/ip-up.local
  echo "[ -x /etc/rc.firewall ] && /etc/rc.firewall" >> /etc/ppp/ip-up.local
  chmod u+x /etc/ppp/ip-up.local
fi
if [ ! -e /etc/ppp/ip-down.local ]; then
  echo "#!/bin/bash" > /etc/ppp/ip-down.local
  echo "#" >> /etc/ppp/ip-down.local
  echo "# This short script just runs any firewall script located at /etc/rc.firewall ." >> /etc/ppp/ip-down.local
  echo "# It will be called whenever a ppp interface goes down. Normally we would hook" >> /etc/ppp/ip-down.local
  echo "# our firewall script in via /sbin/ifdown-local, but a bug in the" >> /etc/ppp/ip-down.local
  echo "# /etc/ppp/ip-down script prevents that from working. This script provides a" >> /etc/ppp/ip-down.local
  echo "# workaround." >> /etc/ppp/ip-down.local
  echo "#" >> /etc/ppp/ip-down.local
  echo "# cheers, Guardddog http://www.simonzone.com/software/guarddog/" >> /etc/ppp/ip-down.local
  echo "#" >> /etc/ppp/ip-down.local
  echo "[ -x /etc/rc.firewall ] && /etc/rc.firewall" >> /etc/ppp/ip-down.local
  chmod u+x /etc/ppp/ip-down.local
fi

POSTUN

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