Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > media > main > by-pkgid > a194280ce2f9077f65cd3ee553a508cb > scriptlet

hylafax-server-4.1.8-2mdk.i586.rpm

PREUN

/bin/sh
/usr/share/rpm-helper/del-service hylafax $1 hylafax-server 
if [ $1 = 0 ] ; then
	# Removing faxgetty entries in /etc/inittab
	perl -pi -e 's!^.*faxgetty.*$!!g' /etc/inittab > /etc/inittab.$$
	/sbin/init q
fi

#%postun server
#if [ $1 = 2 ]; then	/sbin/service hylafax condrestart >/dev/null 2>&1; fi

POSTIN

/bin/sh
if [ $1 = 1 ] ; then /sbin/chkconfig --add hylafax; fi

/usr/share/rpm-helper/add-service hylafax $1 hylafax-server 

#Since perl.prov has problems with special files use this workaround to create FIFO file
mkfifo -m 664 /var/spool/fax/FIFO
chown uucp:uucp /var/spool/fax/FIFO

# Adding faxgetty entry to /etc/inittab
logger adding FaxGetty entry to /etc/inittab
cat /etc/inittab | grep -i "faxgetty entry" || \
echo -e "# FaxGetty Entry\n#t0:23:respawn:/usr/sbin/faxgetty ttyS0" >> /etc/inittab

echo "Please run \"/usr/sbin/faxsetup -server\" to configure your fax server"