Sophie

Sophie

distrib > Mandriva > 2011.0 > x86_64 > media > main-release > by-pkgid > 63434c61d8adfc37789cf2beb633b836 > scriptlet

systemd-units-29-6.x86_64.rpm

PREUN

/bin/sh
if [ $1 -eq 0 ] ; then
        /bin/systemctl --quiet disable \
		hwclock-load.service \
		getty@.service \
		quotaon.service \
		quotacheck.service \
		remote-fs.target \
		systemd-readahead-replay.service \
		systemd-readahead-collect.service \
		2>&1 || :

        /bin/rm -f /etc/systemd/system/default.target 2>&1 || :
fi

POSTIN

/bin/sh
if [ $1 -eq 1 ] ; then
        # Try to read default runlevel from the old inittab if it exists
        runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
        if [ -z "$runlevel" ] ; then
                target="/lib/systemd/system/graphical.target"
        else
                target="/lib/systemd/system/runlevel$runlevel.target"
        fi

        # And symlink what we found to the new-style default.target
        /bin/ln -sf "$target" /etc/systemd/system/default.target 2>&1 || :

	# Enable the services we install by default.
	/bin/systemctl --quiet enable \
		hwclock-load.service \
		getty@.service \
		quotaon.service \
		quotacheck.service \
		remote-fs.target \
		systemd-readahead-replay.service \
		systemd-readahead-collect.service \
		2>&1 || :
fi

POSTUN

/bin/sh
if [ $1 -ge 1 ] ; then
        /bin/systemctl daemon-reload 2>&1 || :
fi

Triggers

systemd-units < 19-4

/bin/sh
# Enable the services we install by default.
/bin/systemctl --quiet enable \
	hwclock-load.service \
	quotaon.service \
	quotacheck.service \
	systemd-readahead-replay.service \
	systemd-readahead-collect.service \
	2>&1 || :
# rc-local is now enabled by default in base package
rm -f /etc/systemd/system/multi-user.target.wants/rc-local.service || :