Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 5228e586cde1e356da382d5bfadd1d23 > scriptlet

systemd-units-10-2.fc14.1.i686.rpm

PREUN

/bin/sh
if [ $1 -eq 0 ] ; then
        /bin/systemctl disable \
                getty@.service \
                getty.target \
                remote-fs.target > /dev/null 2>&1 || :

        /bin/rm -f /etc/systemd/system/default.target > /dev/null 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 > /dev/null 2>&1 || :

        # Enable the services we install by default.
        /bin/systemctl enable \
                getty@.service \
                getty.target \
                remote-fs.target > /dev/null 2>&1 || :

        # Temporary fix for broken upgrades between older F14 rawhide to newer F14 rawhide. Should be removed eventually.
        /bin/systemctl enable \
                dbus.service \
                dbus.socket > /dev/null 2>&1 || :
fi

POSTUN

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