1 2 3 4 5 6 7
if [ $1 -eq 1 ]; then /sbin/chkconfig --add dm fi if grep -qs '^x:5:' /etc/inittab; then /sbin/chkconfig --add dm sed -i 's/^x:5:/#x:5:/' /etc/inittab fi
1 2 3
if [ $1 -eq 0 ]; then /sbin/chkconfig --del dm fi