rc: fix shutdown in not-multithreaded sysv5 mode
This commit is contained in:
parent
fc44a0346b
commit
381f66b2d3
@ -55,13 +55,6 @@ rex="[0-9][0-9]"
|
|||||||
|
|
||||||
export RUNLEVEL
|
export RUNLEVEL
|
||||||
|
|
||||||
[ -e /run/plymouth/pid ] || {
|
|
||||||
# workaround for plymouthd stopping at runlevel change with non-KMS drivers
|
|
||||||
$PLYMOUTHD --attach-to-session --pid-file /run/plymouth/pid
|
|
||||||
$PLYMOUTH --show-splash
|
|
||||||
WORKAROUND=1
|
|
||||||
}
|
|
||||||
|
|
||||||
[ "$previous" != "N" ] && progressbase=10 || progressbase=65
|
[ "$previous" != "N" ] && progressbase=10 || progressbase=65
|
||||||
|
|
||||||
if [ "$runlevel" = "0" -o "$runlevel" = "6" ]; then
|
if [ "$runlevel" = "0" -o "$runlevel" = "6" ]; then
|
||||||
@ -73,9 +66,21 @@ if [ "$runlevel" = "0" -o "$runlevel" = "6" ]; then
|
|||||||
$PLYMOUTH message --text=$"System rebooting, please wait..."
|
$PLYMOUTH message --text=$"System rebooting, please wait..."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
[ -e /run/plymouth/pid ] || {
|
||||||
|
# workaround for plymouthd stopping at runlevel change with non-KMS drivers
|
||||||
|
$PLYMOUTHD --attach-to-session --pid-file /run/plymouth/pid
|
||||||
|
$PLYMOUTH --show-splash
|
||||||
|
WORKAROUND=1
|
||||||
|
}
|
||||||
$PLYMOUTH message --text=$"Starting services..."
|
$PLYMOUTH message --text=$"Starting services..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$runlevel" == "5" -a "$previous" == "N" ]; then
|
||||||
|
[ -e /run/plymouth/pid ] && touch /var/spool/gdm/force-display-on-active-vt
|
||||||
|
else
|
||||||
|
rm -f /var/spool/gdm/force-display-on-active-vt || true
|
||||||
|
fi
|
||||||
|
|
||||||
allservicesnum=`ls -1 $rc_base/rc$runlevel.d/[S,K]* 2>/dev/null | wc -l`
|
allservicesnum=`ls -1 $rc_base/rc$runlevel.d/[S,K]* 2>/dev/null | wc -l`
|
||||||
|
|
||||||
if [ "$previous" != "N" ]; then
|
if [ "$previous" != "N" ]; then
|
||||||
@ -103,7 +108,7 @@ if [ "$previous" != "N" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
progress=`expr $progressbase + $i \* \( 100 - $progressbase \) / ${allservicesnum}`
|
progress=`expr $progressbase + $i \* \( 100 - $progressbase \) / ${allservicesnum}`
|
||||||
$servicefile stop >> $LOGFILE
|
[ -w $LOGFILE ] && $servicefile stop >> $LOGFILE || $servicefile stop
|
||||||
i=`expr $i + 1`
|
i=`expr $i + 1`
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
@ -113,12 +118,6 @@ fi
|
|||||||
|
|
||||||
echo -e $"Starting runlevel $runlevel services...""\r"
|
echo -e $"Starting runlevel $runlevel services...""\r"
|
||||||
|
|
||||||
if [ "$runlevel" == "5" -a "$previous" == "N" ]; then
|
|
||||||
[ -e /run/plymouth/pid ] && touch /var/spool/gdm/force-display-on-active-vt
|
|
||||||
else
|
|
||||||
rm -f /var/spool/gdm/force-display-on-active-vt
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$multithread" = "1" ]; then
|
if [ "$multithread" = "1" ]; then
|
||||||
|
|
||||||
# recreate multithreaded dependencies
|
# recreate multithreaded dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user