openrc/init.d/dumpon.in

26 lines
492 B
Plaintext
Raw Normal View History

#!@SBINDIR@/openrc-run
2009-05-01 19:41:40 +05:30
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
description="Configures a specific kernel dump device."
depend() {
need swap
keyword -jail -prefix
}
start() {
# Setup any user requested dump device
2009-04-27 13:21:18 +05:30
if [ -n "$dump_device" ]; then
ebegin "Activating kernel core dump device ($dump_device)"
dumpon ${dump_device}
eend $?
fi
}
stop() {
ebegin "Deactivating kernel core dump device"
dumpon off
eend $?
}