[Pkg-sysvinit-devel] Bug#743743: initscripts: bootmisc.sh to use /run/nologin
Paul Szabo
paul.szabo at sydney.edu.au
Sat Apr 5 21:15:59 UTC 2014
Package: initscripts
Version: 2.88dsf-51
Severity: normal
The script /etc/init.d/bootmisc.sh uses /var/lib/initscripts/nologin
still, should use /run/nologin instead, as all of
/etc/init.d/rmnologin
/sbin/shutdown
/lib/i386-linux-gnu/security/pam_nologin.so
seem to do. - A patched(?) bootmisc.sh is shown below.
I wonder whether bugs #510582 #510712 #546245 are now "done" and
could be closed.
Cheers, Paul
Paul Szabo psz at maths.usyd.edu.au http://www.maths.usyd.edu.au/u/psz/
School of Mathematics and Statistics University of Sydney Australia
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.2.54-pk06.23-i386 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages initscripts depends on:
ii coreutils 8.21-1.1
ii debianutils 4.4
ii libc6 2.18-4
ii lsb-base 4.1+Debian12
ii mount 2.20.1-5.6
ii sysv-rc 2.88dsf-51
ii sysvinit-utils 2.88dsf-51
Versions of packages initscripts recommends:
ii e2fsprogs 1.42.9-3
ii psmisc 22.21-2
initscripts suggests no packages.
-- Configuration Files:
/etc/default/rcS changed:
TMPTIME=0
SULOGIN=no
DELAYLOGIN=yes
VERBOSE=no
FSCKFIX=yes
/etc/init.d/bootmisc.sh changed:
PATH=/sbin:/usr/sbin:/bin:/usr/bin
[ "$DELAYLOGIN" ] || DELAYLOGIN=yes
. /lib/init/vars.sh
do_start () {
#
# If login delaying is enabled then create the flag file
# which prevents logins before startup is complete
#
case "$DELAYLOGIN" in
Y*|y*)
echo "System bootup in progress - please wait" > /run/nologin
;;
esac
# Create /var/run/utmp so we can login.
: > /var/run/utmp
if grep -q ^utmp: /etc/group
then
chmod 664 /var/run/utmp
chgrp utmp /var/run/utmp
fi
# Remove bootclean's flag files.
# Don't run bootclean again after this!
rm -f /tmp/.clean /run/.clean /run/lock/.clean
rm -f /tmp/.tmpfs /run/.tmpfs /run/lock/.tmpfs
}
case "$1" in
start|"")
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
# No-op
;;
*)
echo "Usage: bootmisc.sh [start|stop]" >&2
exit 3
;;
esac
:
/etc/init.d/rmnologin changed:
PATH=/sbin:/bin
[ "$DELAYLOGIN" ] || DELAYLOGIN=yes
. /lib/init/vars.sh
do_start () {
#
# If login delaying is enabled then remove the flag file
#
case "$DELAYLOGIN" in
Y*|y*)
# PSz (long ago)
if [ -f /etc/nologin.KEEP ]; then
cp /etc/nologin.KEEP /etc/nologin
cp /etc/nologin.KEEP /run/nologin
else
rm -f /etc/nologin
rm -f /run/nologin
fi
;;
esac
}
do_status () {
if [ ! -f /run/nologin ] ; then
return 0
else
return 4
fi
}
case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
# No-op
;;
status)
do_status
exit $?
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
:
-- no debconf information
More information about the Pkg-sysvinit-devel
mailing list