File laptop-mode-1.53-install_sh.diff of Package laptop-mode-tools

Index: laptop-mode-tools_1.49/install.sh
================================================================================
--- laptop-mode-tools_1.53/install.sh
+++ laptop-mode-tools_1.53/install.sh
@@ -183,7 +183,8 @@
 # Install pm-utils hook only if pm-utils config dir is present, or force the
 # install if we have a DESTDIR.
 if [ -n "$DESTDIR" -o -d "$DESTDIR/usr/lib/pm-utils/sleep.d" ] ; then
-	if ( ! $INSTALL -D -m 755 usr/lib/pm-utils/sleep.d/99laptop-mode "$DESTDIR/usr/lib/pm-utils/sleep.d/99laptop-mode" ) ; then
+	# I don't think that this is the first thing that needs to run after resume, so i prio'd it down -- seife
+	if ( ! $INSTALL -D -m 755 usr/lib/pm-utils/sleep.d/99laptop-mode "$DESTDIR/usr/lib/pm-utils/sleep.d/05laptop-mode" ) ; then
 		echo "$0: Failed to install 99-laptop-mode into /usr/lib/pm-utils/sleep.d. Installation failed."
 		exit 36
 	fi
@@ -276,9 +277,9 @@
 
 if [ "$INIT_D" != "none" ] ; then
 	if [ -d "$INIT_D" -o -n "$DESTDIR" ] ; then
-		$INSTALL -d -m 755 "$INIT_D"
-		if ( ! $INSTALL -m 755 etc/init.d/laptop-mode "$INIT_D" ) ; then
-			echo "$0: failed to install init script in $INIT_D. Installation failed."
+		$INSTALL -d -m 755 "$DESTDIR/$INIT_D"
+		if ( ! $INSTALL -m 755 etc/init.d/laptop-mode "$DESTDIR/$INIT_D" ) ; then
+			echo "$0: failed to install init script in $DESTDIR/$INIT_D. Installation failed."
 			exit 16
 		fi
 		if [ -f "$DESTDIR/etc/rcS.d/S99laptop_mode" ] ; then