File: etc.init.d.dumputils

package info (click to toggle)
dumputils 1.0.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 184 kB
  • ctags: 175
  • sloc: ansic: 2,403; makefile: 133; sh: 88
file content (50 lines) | stat: -rwxr-xr-x 1,080 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
#! /bin/sh
# /etc/init.d/dumputils
#	
### BEGIN INIT INFO
# Provides:          dumputils
# Required-Start:    $network &named
# Default-Start:      2 3 4 5
# Default-Stop:       0 1 6
# Short-Description: Initializes the Linux Kernel Crash Dump system
# Description:       Provides user space applications to control the
#                    LKCD modules and manage the 2 stage dump process.
### END INIT INFO

CONFIGDUMP=/usr/sbin/configdump
SAVEDUMP=/usr/sbin/savedump

# If the dumputils executables aren't all present, give up
[ -x ${CONFIGDUMP} ] || exit 1
[ -x ${SAVEDUMP} ] || exit 1

#
# Handle System V init conventions...
#
case $1 in
start | restart)
	# Message
	echo "Saving system crash dump (if necessary)..."

	# Save crash dump (if one exists)
	${SAVEDUMP}
	
	# Load configuration
	${CONFIGDUMP} || exit 0
	;;

reload | force-reload )
	# Reload configuration
	${CONFIGDUMP} || exit 0
	;;
stop)
	# Prevent crash dumps
	${CONFIGDUMP} -l 0 || exit 0
	;;
*)
	echo "Usage: /etc/init.d/dumputils {start|stop|reload|force-reload|restart}"
        exit 1
	;;
esac

exit 0