File: killpower

package info (click to toggle)
apcupsd 3.14.14-7
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,904 kB
  • sloc: ansic: 24,826; cpp: 9,230; sh: 4,484; makefile: 1,200; tcl: 368; objc: 317; php: 107
file content (23 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol before
# apcupsd kills the power in the UPS. You probably
# need to edit this to mount read-only /usr and /var,
# otherwise apcupsd will not run.

# Choose one of this solution
#mount -n -o ro /usr
#mount -n -o ro /var
#
#mount | awk '/ext2/ { print $3 }' | while read line; do
#	mount -n -o ro,remount $line
#done
#mount | awk '/ext3/ { print $3 }' | while read line; do
#	mount -n -o ro,remount $line
#done
#mount | awk '/reiserfs/ { print $3 }' | while read line; do
#	mount -n -o ro,remount $line
#done

exit 0