Sophie

Sophie

distrib > PLD > th > x86_64 > by-pkgid > 157c778f2bba12eb682492bb714c9ccd > scriptlet

dhcp_probe-1.3.0-3.x86_64.rpm

PREUN

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

	if [ $1 -eq 0 ]; then 
		export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog 
		/bin/systemd_booted && /bin/systemctl stop dhcp_probe.target || : 
		/bin/systemctl --quiet disable dhcp_probe.target || : 
	fi

POSTIN

/bin/sh
/sbin/chkconfig --add dhcp_probe
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/dhcp_probe ] && . /etc/sysconfig/dhcp_probe
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/dhcp_probe ]; then
/sbin/service dhcp_probe restart 1>&2 || :;
else
echo 'Run "/sbin/service dhcp_probe start" to start dhcp_probe service.'
fi
fi
else
if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
if [ -f /var/lock/subsys/dhcp_probe ]; then
echo 'Run "/sbin/service dhcp_probe restart" to restart dhcp_probe service.'
fi
else	NORESTART=1	# for %%systemd_post if called after
fi
fi };
	export SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog 
	/bin/systemd_booted && /bin/systemctl daemon-reload || : 
	if [ $1 -eq 1 ]; then 
		/bin/systemctl preset --preset-mode=enable-only dhcp_probe.target >/dev/null || : 
		/bin/systemd_booted && echo 'Run "/bin/systemctl start dhcp_probe.target" to start dhcp_probe.target.' || : 
	elif [ -z "$NORESTART" ]; then 
		/bin/systemd_booted && /bin/systemctl try-restart dhcp_probe.target || : 
	else 
		/bin/systemd_booted && echo 'Run "/bin/systemctl restart dhcp_probe.target" to restart dhcp_probe.target.' || : 
	fi

POSTUN

/bin/sh
/bin/systemd_booted && SYSTEMD_LOG_LEVEL=warning SYSTEMD_LOG_TARGET=syslog /bin/systemctl daemon-reload || :