File: init.d

package info (click to toggle)
welcome2l 3.05-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 440 kB
  • sloc: ansic: 1,433; makefile: 71; sh: 52
file content (52 lines) | stat: -rw-r--r-- 1,019 bytes parent folder | download
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
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
# vim:ts=4:et:sts=4
### BEGIN INIT INFO
# Provides:          welcome2l
# Required-Start:    $local_fs $remote_fs
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Linux ANSI boot logo
# Description:       Write the Linux ANSI boot logo to the
#                    /etc/issue.welcome2l file
### END INIT INFO

DAEMON="/usr/share/welcome2l/welcome2l-generator"
NAME="welcome2l"

test -f "$DAEMON" || exit 0

# Read our defaults file
test -r "$DEFAULTSFILE" && . "$DEFAULTSFILE"

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

# Define LSB log_* functions.
. /lib/lsb/init-functions

set -e
umask 022
status=0

case "$1" in
  start|restart|reload|force-reload)
    log_action_begin_msg "Updating $ISSUE_FILE"

    $DAEMON || status=$?

    log_action_end_msg $status
    ;;

  stop)
    ;;

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

exit 0