3 # allowlogin Allow users to login
5 # description: Allow users to login.
8 [ -f /etc/sysconfig/system ] && . /etc/sysconfig/system
10 # exit early without loading big init.d functions
12 start|restart|try-restart|reload|force-reload)
14 case "$DELAY_LOGIN" in
15 yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
23 # Source function library.
24 . /etc/rc.d/init.d/functions
27 if ! is_no "$DELAY_LOGIN" && [ -f /etc/nologin.boot ]; then
28 run_cmd "Allowing users to login" rm -f /etc/nologin /etc/nologin.boot
33 # /etc/nologin when shutting down system
34 if ! is_no "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
35 nls "System shutdown in progress\n" > /etc/nologin
36 chmod 644 /etc/nologin
37 cp -fp /etc/nologin /etc/nologin.boot
42 if ! is_no "$DELAY_LOGIN"; then
43 nls "Delay login is enabled"
45 nls "Delay login is not enabled"
47 if [ -f /etc/nologin ]; then
48 nls "Users are not allowed to login right now"
50 nls "Users are allowed to login right now"
54 # See how we were called.
66 msg_usage "$0 {start|stop|status}"