summaryrefslogtreecommitdiff
path: root/system/nut/nut_restart_udev
diff options
context:
space:
mode:
authorV'yacheslav Stetskevych <slava18@gmail.com>2010-06-17 02:52:26 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-06-17 14:42:26 -0500
commitdbebec2717a01c40b62a2da7e53b677954eb47ca (patch)
treec42b7979842ff65d71e38dab04c6d724db803c61 /system/nut/nut_restart_udev
parentda30a3f51b9d22e19fe9b692f446526b1c48491e (diff)
downloadslackbuilds-dbebec2717a01c40b62a2da7e53b677954eb47ca.tar.gz
system/nut: Added (Network UPS Tools)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/nut/nut_restart_udev')
-rw-r--r--system/nut/nut_restart_udev12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/nut/nut_restart_udev b/system/nut/nut_restart_udev
new file mode 100644
index 0000000000..d289c0f87a
--- /dev/null
+++ b/system/nut/nut_restart_udev
@@ -0,0 +1,12 @@
+#!/bin/sh
+# This file is part of Network UPS Tools build for Slackware Linux.
+# It should be sourced in /etc/rc.d/rc.0 as part of the poweroff sequence.
+# Here, we restart udev so that the system is able to kill off the UPS inverter.
+# Reference: http://www.mail-archive.com/nut-upsdev@lists.alioth.debian.org/msg01099.html
+# To be sourced after the rootfs has been remounted read-only.
+
+if [ -f /etc/killpower ]; then
+echo "Restarting udev to be able to shut the UPS inverter off..."
+/etc/rc.d/rc.udev start
+sleep 10
+fi