]> git.pld-linux.org Git - projects/rc-scripts.git/blob - init/allowlogin.conf
fix message printing; pass anything to systemd if it is up (status is valid action...
[projects/rc-scripts.git] / init / allowlogin.conf
1 description     "Allow users to login"
2
3 start on pld.sysinit-done
4 stop on pld.shutdown-started
5
6 console output
7
8 pre-start script
9         [ -f /etc/sysconfig/system ] && . /etc/sysconfig/system
10
11         # exit early without loading big init.d functions
12         case "$DELAY_LOGIN" in
13                 yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
14                 ;;
15         *)
16                 /sbin/initctl -q stop
17                 ;;
18         esac
19 end script
20
21 script
22         # Source function library.
23         . /etc/rc.d/init.d/functions
24
25         if is_yes "$DELAY_LOGIN" && [ -f /etc/nologin.boot ]; then
26                 run_cmd "Allowing users to login" rm -f /etc/nologin /etc/nologin.boot
27         fi
28         end script
29
30 pre-stop script
31         # Source function library.
32         . /etc/rc.d/init.d/functions
33
34         # /etc/nologin when shutting down system
35         if is_yes "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
36                 nls "System shutdown in progress\n" > /etc/nologin
37                 chmod 644 /etc/nologin
38                 cp -fp /etc/nologin /etc/nologin.boot
39         fi
40 end script
This page took 0.025409 seconds and 3 git commands to generate.