File: init.d

package info (click to toggle)
welcome2l 3.04-20
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 412 kB
  • ctags: 77
  • sloc: ansic: 1,468; makefile: 150; sh: 58
file content (42 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh
#
#

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
DAEMON="/usr/bin/welcome2l"
NAME="welcome2l"

test -f "$DAEMON" || exit 0

umask 022

# Read our defaults file
test -r /etc/default/welcome2l && . /etc/default/welcome2l

# Set default issue file
ISSUE_FILE="${ISSUE_FILE:-/etc/issue.welcome2l}"

set -e
umask 022

case "$1" in
  start|restart|force-reload)
	echo -n "Updating $ISSUE_FILE..."
	
 	$DAEMON ${OPTIONS:--getty} \
		"${MSG:+-msg$MSG}" \
		"${CPU:+-cpu$CPU}" > "$ISSUE_FILE"

	echo >> "$ISSUE_FILE"
	echo "done."
	;;
  stop)
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|force-reload}" >&2
	exit 1
	;;
esac

exit 0