Sophie

Sophie

distrib > PLD > th > x86_64 > by-pkgid > 59f1b4ada5878bb805e7919aa8b97f5d > scriptlet

cups-2.3.3-4.x86_64.rpm

PREUN

/bin/sh
if [ "$1" = "0" ]; then
	{
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/cups ]; then
/sbin/service cups stop 1>&2 || :;
fi
fi };
	/sbin/chkconfig --del cups
fi

 
if [ $1 -eq 0 ] && [ -x "/lib/systemd/systemd-update-helper" ]; then 
    # Package removal, not upgrade 
    /lib/systemd/systemd-update-helper remove-system-units org.cups.cupsd.service org.cups.cupsd.socket org.cups.cupsd.path || : 
fi

POSTIN

/bin/sh
# Deal with config migration due to CVE-2012-5519 (STR #4223)
_keywords="^\(AccessLog\|CacheDir\|ConfigFilePerm\|\
DataDir\|DocumentRoot\|ErrorLog\|FatalErrors\|\
FileDevice\|FontPath\|Group\|LogFilePerm\|\
LPDConfigFile\|PageLog\|Printcap\|PrintcapFormat\|\
RemoteRoot\|RequestRoot\|ServerBin\|ServerCertificate\|\
ServerKey\|ServerRoot\|SMBConfigFile\|StateDir\|\
SystemGroup\|SystemGroupAuthKey\|TempDir\|User\)\b"
if [ -f /etc/cups/cupsd.conf ] && grep -iq "$_keywords" /etc/cups/cupsd.conf; then
	echo "# Settings automatically moved from cupsd.conf by RPM package:" >> /etc/cups/cups-files.conf
	grep -i "$_keywords" /etc/cups/cupsd.conf >> /etc/cups/cups-files.conf || :
	/bin/sed -i -e "s,$_keywords,#&,ig" /etc/cups/cupsd.conf || :
fi
/sbin/chkconfig --add cups
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/cups ] && . /etc/sysconfig/cups
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/cups ]; then
/sbin/service cups restart 1>&2 || :;
else
echo 'Run "/sbin/service cups start" to start cups daemon.'
fi
fi
else
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/cups ]; then
echo 'Run "/sbin/service cups restart" to restart cups daemon.'
fi
else	NORESTART=1	# for %%systemd_post if called after
fi
fi };
/sbin/rmmod usblp > /dev/null 2>&1 || :

 
if [ $1 -eq 1 ] && [ -x "/lib/systemd/systemd-update-helper" ]; then 
    # Initial installation 
    /lib/systemd/systemd-update-helper install-system-units org.cups.cupsd.service org.cups.cupd.socket org.cups.cupsd.path || : 
fi

POSTUN

/bin/sh

	[ -x "/lib/systemd/systemd-update-helper" ] && 
		/lib/systemd/systemd-update-helper system-reload || :

Triggers

cups < 1:1.5.2-1

/bin/sh
 
if [ $1 -eq 1 ] && [ -x "/lib/systemd/systemd-update-helper" ]; then 
    # Initial installation 
    /lib/systemd/systemd-update-helper install-system-units org.cups.cupsd.service org.cups.cupsd.socket org.cups.cupsd.path || : 
fi