Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > media > main > by-pkgid > 360d4bbbd686f03c48e7897e78a5a3d9 > scriptlet

hylafax-server-4.2.1-2mdk.x86_64.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"