Sophie

Sophie

distrib > Mageia > 3 > i586 > by-pkgid > 726aa57f9ac48ab4c55a57ed48c38727 > scriptlet

systemd-units-195-22.mga3.i586.rpm

PREUN

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

        /usr/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=$(/usr/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
        if [ -z "$runlevel" ] ; then
                target="/usr/lib/systemd/system/multi-user.target"
        else
                target="/usr/lib/systemd/system/runlevel$runlevel.target"
        fi

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

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

hostname_new=`cat /etc/hostname 2>/dev/null`
if [ -z $hostname_new ]; then
        hostname_old=`cat /etc/sysconfig/network 2>/dev/null | grep HOSTNAME | cut -d "=" -f2`
        if [ ! -z $hostname_old ]; then
                echo $hostname_old >> /etc/hostname
        else
                echo "localhost" >> /etc/hostname
        fi
fi

POSTUN

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

Triggers

systemd-units < 35-1

/bin/sh
# Enable the services we install by default.
        /usr/bin/systemctl --quiet enable \
                hwclock-load.service \
                getty@.service \
                remote-fs.target \
                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 || :

# (blino) systemd 195 changed the prototype of logind's OpenSession()
# see http://lists.freedesktop.org/archives/systemd-devel/2012-October/006969.html
# and http://cgit.freedesktop.org/systemd/systemd/commit/?id=770858811930c0658b189d980159ea1ac5663467