[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. 455547aefac7bfbdf78425fda03e6ce404a12f1a

Steffen Moeller moeller at debian.org
Mon Dec 7 15:57:39 UTC 2009


The following commit has been merged in the master branch:
commit 455547aefac7bfbdf78425fda03e6ce404a12f1a
Author: Steffen Moeller <moeller at debian.org>
Date:   Mon Dec 7 16:55:05 2009 +0100

    Checking on -r rules.yaml and frameworkd.conf
    
    Many thanks go to Neil Jerram for indicating the problems
    at those bits of the code. The files should be modified
    only when they are existing and the file should be copied
    only when the backup copy is not already existing.

diff --git a/install.sh b/install.sh
index 99445f4..fb07b58 100755
--- a/install.sh
+++ b/install.sh
@@ -1186,17 +1186,25 @@ po::powerokwait:/etc/init.d/powerfail stop
 __END__
 
 
-	echo " * Disabling automated screen lock " # FIXME: should become optional
-	if [ ! -r "$INST_DIR"/etc/frameworkd.conf.orig ]; then
-		chroot "$INST_DIR" cp /etc/frameworkd.conf /etc/frameworkd.conf.orig
+	if [ -r "$INST_DIR"/etc/frameworkd.conf ]; then
+		echo " * Disabling automated screen lock " # FIXME: should become optional
+		if [ ! -r "$INST_DIR"/etc/frameworkd.conf.orig ]; then
+			chroot "$INST_DIR" cp /etc/frameworkd.conf /etc/frameworkd.conf.orig
+		fi
+		cat "$INST_DIR"/etc/frameworkd.conf.orig | sed -e 's/^idle_prelock.*/idle_prelock = 0/' -e 's/^lock.*/lock = 0/' > "$INST_DIR"/etc/frameworkd.conf
+	else
+		echo "W: Missing file /etc/frameworkd.conf to disable automated screen lock"
 	fi
-	cat "$INST_DIR"/etc/frameworkd.conf.orig | sed -e 's/^idle_prelock.*/idle_prelock = 0/' -e 's/^lock.*/lock = 0/' > "$INST_DIR"/etc/frameworkd.conf
 
-	echo " * Allow screen unlock to work without shutting off (AUX pressed, followed by Power shortly pressed)"
-	if [ ! -r "$INST_DIR"/etc/freesmartphone/oevents/rules.yaml.orig ]; then
-		chroot "$INST_DIR" cp /etc/freesmartphone/oevents/rules.yaml /etc/freesmartphone/oevents/rules.yaml.orig
+	if [ -r "$INST_DIR"/etc/freesmartphone/oevents/rules.yaml ]; then
+		echo " * Allow screen unlock to work without shutting off (AUX pressed, followed by Power shortly pressed)"
+		if [ ! -r "$INST_DIR"/etc/freesmartphone/oevents/rules.yaml.orig ]; then
+			chroot "$INST_DIR" cp /etc/freesmartphone/oevents/rules.yaml /etc/freesmartphone/oevents/rules.yaml.orig
+		fi
+		cat "$INST_DIR"/etc/freesmartphone/oevents/rules.yaml.orig | sed -e '/Suspend Handling/,/Suspend\(\)/ d' > "$INST_DIR"/etc/freesmartphone/oevents/rules.yaml
+	else
+		echo "W: Missing file /etc/freesmartphone/oevents/rules.yaml to allow screen unlock to work without shutting off"
 	fi
-	cat "$INST_DIR"/etc/freesmartphone/oevents/rules.yaml.orig | sed -e '/Suspend Handling/,/Suspend\(\)/ d' > "$INST_DIR"/etc/freesmartphone/oevents/rules.yaml
 
 	echo " * Creating /etc/modules"
 	cat > "$INST_DIR/etc/modules" <<__END__

-- 
Various non-packaged files



More information about the pkg-fso-commits mailing list