/etc/init.d/vzeventd is in vzctl 4.9.4-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | #!/bin/sh
#
# vzeventd This shell script takes care of starting and stopping
# vzeventd daemon for OpenVZ.
#
# chkconfig: 2345 95 89
# description: vzeventd is OpenVZ events daemon. \
# It takes care of events sent by the OpenVZ kernel and performs required \
# actions associated with those events.
### BEGIN INIT INFO
# Provides: vzeventd
# Required-start: $remote_fs
# Required-stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Start-Before: vz
# X-Stop-After: vz
# Short-Description: start and stop vzeventd
# Description: vzeventd is the OpenVZ events daemon.
# It takes care of events sent by the OpenVZ kernel
# and performs required actions associated with those events.
### END INIT INFO
. /usr/lib/vzctl/vzctl/scripts/initd-functions
prog=vzeventd
lockfile=$VARLOCK/$prog
load_module() {
modprobe vzevent reboot_event=1
}
check() {
local param=/sys/module/vzevent/parameters/reboot_event
__echo "Checking vzevent kernel module ..."
if ! lsmod | fgrep -qw vzevent; then
print_failure
return 1
fi
echo 1 > $param
if ! cat $param | fgrep -qw 1; then
print_failure
print_warning "vzevent module should be loaded with reboot_event=1 parameter"
echo
return 1
fi
print_success
return 0
}
start() {
[ "$(id -u)" != "0" ] && exit 4
[ -x /usr/sbin/vzeventd ] || exit 5
check_vzkernel > /dev/null
[ -r /etc/sysconfig/vzeventd ] && . /etc/sysconfig/vzeventd
[ -r /etc/default/vzeventd ] && . /etc/default/vzeventd
[ -f $lockfile ] && exit 0 # Already running
load_module
check || exit 1
echo -n "Starting $prog: "
vzdaemon_start $prog $OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
return $RETVAL
}
stop() {
[ "$(id -u)" != "0" ] && exit 4
echo -n "Shutting down $prog: "
vzdaemon_stop $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
vzdaemon_status $prog
;;
restart|force-reload)
stop
start
;;
try-restart|condrestart)
if vzdaemon_status $prog >/dev/null 2>&1; then
stop
start
fi
;;
reload)
exit 3
;;
*)
echo "Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
exit 2
esac
|