File: netconsole.init

package info (click to toggle)
netconsole 0.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 96 kB
  • sloc: sh: 134; makefile: 33
file content (40 lines) | stat: -rwxr-xr-x 836 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
set -eu

### BEGIN INIT INFO
# Provides:          netconsole
# Required-Start:    $named $network $local_fs $remote_fs
# Required-Stop:     $named $network $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Dynamically configure Linux netconsole
### END INIT INFO

NAME=netconsole
DAEMON=/usr/sbin/netconsole-setup

# Exit if the package is not installed
test -x $DAEMON || exit 0

. /lib/lsb/init-functions

# Read configuration variable file if it is present
NETCONSOLE_OPTS=
if test -r /etc/default/$NAME; then
	. /etc/default/$NAME
fi

case "$1" in
  start|restart|force-reload)
	# shellcheck disable=SC2086
	$DAEMON $NETCONSOLE_OPTS
	;;
  status|stop)
	# Nothing to do
	exit 0
	;;
  *)
	echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
	exit 2
	;;
esac