Sophie

Sophie

distrib > * > 2009.0 > i586 > by-pkgid > 8e4883d6f53394b1f281bd18294b3fe2 > scriptlet

firewalladmin-0.4-5mdv2009.0.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