All pastes #566446 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-14 13:22 UTC
rendered paste body
# only needed on upgrade
if [ $1 != 0 ]; then
        # handle the switch to an independant prefdm initscript
        if grep -q '^x:5' /etc/inittab; then
                rm -f /etc/inittab.new
                sed 's/x:5/#x:5/' < /etc/inittab > /etc/inittab.new
                mv -f /etc/inittab.new /etc/inittab
                chkconfig --add dm || :
        fi

        # handle single user mode declaration
        if ! grep -q '..:S:' /etc/inittab; then
                cat >> /etc/inittab <<EOF

# Single user mode
~~:S:wait:/bin/sh
EOF
        fi