summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/vyatta-cfg-system.postinst.in7
-rwxr-xr-xscripts/rl-system.init3
-rw-r--r--templates/system/console/powersave/node.def6
3 files changed, 13 insertions, 3 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index 8d288e75..0d2c29e5 100644
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -25,6 +25,13 @@ if ! grep -q '^tss' /etc/passwd; then
adduser --system --group --shell /usr/sbin/nologin --home /var/lib/tpm tss
fi
+# Force screenblanker to be off, it can be enabled later if desired
+if [ -f /etc/console-tools/config ]; then
+ sed -i -e '/^POWERDOWN/s/=.*$/=0/' \
+ -e '/^BLANK_TIME/s/=.*$/=0/' \
+ -e '/^BLANK_DPMS/s/=.*$/=off/' /etc/console-tools/config
+fi
+
if [ "$sysconfdir" != "/etc" ]; then
touch /etc/sudoers
cp -p /etc/sudoers /etc/sudoers.bak
diff --git a/scripts/rl-system.init b/scripts/rl-system.init
index d8abbf01..0e8d23d8 100755
--- a/scripts/rl-system.init
+++ b/scripts/rl-system.init
@@ -203,9 +203,6 @@ start () {
update_version_info
- # Turn off console screen blanker
- setterm -blank 0 -powersave off -powerdown 0 </dev/console >/dev/console 2>&1
-
# Clear out login banner changes
for f in /etc/issue /etc/issue.net /etc/motd
do
diff --git a/templates/system/console/powersave/node.def b/templates/system/console/powersave/node.def
new file mode 100644
index 00000000..e863e020
--- /dev/null
+++ b/templates/system/console/powersave/node.def
@@ -0,0 +1,6 @@
+help: Enable screen blank powersaving on VGA console
+
+create: setterm -blank 15 -powersave powerdown -powerdown 60 \
+ </dev/console >/dev/console 2>&1
+delete: setterm -blank 0 -powersave off -powerdown 0 \
+ </dev/console >/dev/console 2>&1