From 9c19385b6446ee3c343a0ca5b67630cb344be8ca Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Sun, 23 Feb 2025 10:39:36 +0000 Subject: [PATCH] Fix restore and add a backlight toggle for intel displays in backup-image. --- backup-image/intel-backlight-toggle.sh | 5 +++++ backup-image/restore.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 backup-image/intel-backlight-toggle.sh diff --git a/backup-image/intel-backlight-toggle.sh b/backup-image/intel-backlight-toggle.sh new file mode 100755 index 0000000..e34c92d --- /dev/null +++ b/backup-image/intel-backlight-toggle.sh @@ -0,0 +1,5 @@ +#!/bin/bash +echo -n "0" >> /sys/class/backlight/intel_backlight/brightness; +read; +echo -n "24000" >> /sys/class/backlight/intel_backlight/brightness; +exit 0; diff --git a/backup-image/restore.sh b/backup-image/restore.sh index e0653e7..0dd8176 100755 --- a/backup-image/restore.sh +++ b/backup-image/restore.sh @@ -25,7 +25,7 @@ if [ $? -ne 0 ]; then fi echo; echo "Restoring up partition table..."; -sfdisk "/dev/$2" < "/mnt/tabls/$1.tbl"; +sfdisk -d "/dev/$2" < "/mnt/tabls/$1.tbl"; rm -rf /tmp/a; echo "Finished!"; exit 0;