Lines 2-7
Link Here
|
2 |
|
2 |
|
3 |
# PROVIDE: slim |
3 |
# PROVIDE: slim |
4 |
# REQUIRE: LOGIN |
4 |
# REQUIRE: LOGIN |
|
|
5 |
# KEYWORD: shutdown |
5 |
|
6 |
|
6 |
# |
7 |
# |
7 |
# Add the following lines to /etc/rc.conf to enable slim: |
8 |
# Add the following lines to /etc/rc.conf to enable slim: |
Lines 11-23
Link Here
|
11 |
# Alternatively, edit /etc/ttys and change the line below |
12 |
# Alternatively, edit /etc/ttys and change the line below |
12 |
# ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure |
13 |
# ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure |
13 |
# to this: |
14 |
# to this: |
14 |
# ttyv8 "/usr/local/bin/slim" xterm on secure |
15 |
# ttyv8 "%%PREFIX%%/bin/slim" xterm on secure |
15 |
|
16 |
|
16 |
. /etc/rc.subr |
17 |
. /etc/rc.subr |
17 |
|
18 |
|
18 |
name="slim" |
19 |
name="slim" |
19 |
rcvar=`set_rcvar` |
20 |
rcvar=`set_rcvar` |
20 |
|
21 |
|
|
|
22 |
start_precmd=${name}_rmfile |
23 |
stop_precmd=${name}_prestop |
24 |
stop_postcmd=${name}_rmfile |
25 |
|
21 |
load_rc_config $name |
26 |
load_rc_config $name |
22 |
|
27 |
|
23 |
: ${slim_enable="NO"} |
28 |
: ${slim_enable="NO"} |
Lines 26-29
Link Here
|
26 |
command_args="-d" |
31 |
command_args="-d" |
27 |
pidfile=/var/run/slim.pid |
32 |
pidfile=/var/run/slim.pid |
28 |
|
33 |
|
|
|
34 |
slim_rmfile () |
35 |
{ |
36 |
local file |
37 |
|
38 |
for file in $pidfile /var/run/slim.auth; do |
39 |
[ -e "$file" ] && unlink $file |
40 |
done |
41 |
|
42 |
return 0 |
43 |
} |
44 |
|
45 |
slim_prestop () |
46 |
{ |
47 |
local xpid |
48 |
|
49 |
xpid=`ps -axww | grep '/bin/[X] .* -auth /var/run/slim.auth'` |
50 |
kill ${xpid%% *} |
51 |
} |
52 |
|
29 |
run_rc_command "$1" |
53 |
run_rc_command "$1" |