Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > contrib-release > by-pkgid > 0f0cf2d00fa20e84ba856c2bd56d4d75 > scriptlet

firewalladmin-0.4-2mdv2008.1.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