Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > e422b0dbe0308ee4df51b7f16ee617af > scriptlet

firewalladmin-0.4-1mdk.noarch.rpm

POSTIN

/bin/sh
# this logic was taken from the naat-backend spec file
# add sudoers entry
/bin/chmod a+w /etc/sudoers
grep -q 'apache' /etc/sudoers || \
echo "apache ALL=(root) NOPASSWD:/sbin/iptables,NOPASSWD:/sbin/iptables-save,NOPASSWD:/sbin/iptables-restore" >> /etc/sudoers;
/bin/chmod 0440 /etc/sudoers
/etc/rc.d/init.d/httpd restart

POSTUN

/bin/sh
# this logic was taken from the naat-backend spec file
# it it's a full uninstall
if [ "$1" = "0" ]; then
# remove sudoers entry
/bin/chmod a+w /etc/sudoers
grep -q 'apache' /etc/sudoers && \
	perl -ni -e 'print unless m!^apache.*!' /etc/sudoers;
/bin/chmod 0440 /etc/sudoers
fi
/etc/rc.d/init.d/httpd restart