Author: alexander Date: 2006-07-10 07:41:15 -0600 (Mon, 10 Jul 2006) New Revision: 1596
Added: trunk/packages/hibernate-script/hibernate-script-1.91-lfs-1.patch Modified: trunk/packages/hibernate-script/Makefile Log: Fixed reinstallation of hibernate-script. Added some failsafe defaults, e.g. disabling the write cache on all hard drives. Fixed network scriptlet to use "ip" instead of "ifconfig". Modified: trunk/packages/hibernate-script/Makefile =================================================================== --- trunk/packages/hibernate-script/Makefile 2006-07-10 13:34:36 UTC (rev 1595) +++ trunk/packages/hibernate-script/Makefile 2006-07-10 13:41:15 UTC (rev 1596) @@ -8,6 +8,8 @@ URL-$(FILE)= http://www.suspend2.net/downloads/all/$(FILE) SHA-$(FILE)= b81808f499068937a9696e977ef1cfd499d21eee +PATCH1=$(DIR)-lfs-1.patch + # Targets include $(ROOT)/scripts/functions @@ -20,7 +22,9 @@ $(std_build) compile-stage2: - PREFIX=/usr ./install.sh + patch -Np1 -i ../$(PATCH1) + rm -rf /etc/hibernate + yes | PREFIX=/usr ./install.sh clean: -rm -rf $(DIR) Added: trunk/packages/hibernate-script/hibernate-script-1.91-lfs-1.patch =================================================================== --- trunk/packages/hibernate-script/hibernate-script-1.91-lfs-1.patch (rev 0) +++ trunk/packages/hibernate-script/hibernate-script-1.91-lfs-1.patch 2006-07-10 13:41:15 UTC (rev 1596) @@ -0,0 +1,72 @@ +diff -ur hibernate-script-1.91/common.conf hibernate-script-1.91.lfs/common.conf +--- hibernate-script-1.91/common.conf 2006-06-05 17:20:32.000000000 +0600 ++++ hibernate-script-1.91.lfs/common.conf 2006-07-10 16:26:01.000000000 +0600 +@@ -38,7 +38,7 @@ + # IncompatibleDevices /dev/dsp /dev/video* + + ### diskcache +-# DisableWriteCacheOn /dev/hda ++DisableWriteCacheOn /dev/hd? /dev/sd? + + ### fbsplash (enable SwitchToTextMode if you use this) + # FBSplash on +@@ -75,6 +75,11 @@ + # OnSuspend 20 echo "Good night!" + # OnResume 20 echo "Good morning!" + ++# Rerun dhcpcd in the background for all known network interfaces ++OnResume 59 for netdev in /sys/class/net/*/uevent ; do echo add >netdev ; done ++# Restore console font ++OnResume 20 openvt -f -c 1 -w /etc/rc.d/init.d/console start ++ + ### modules + # UnloadModules snd_via82cxxx usb-ohci + # UnloadAllModules yes +@@ -86,8 +91,8 @@ + # GentooModulesAutoload yes + + ### network +-# DownInterfaces eth0 +-# UpInterfaces auto ++DownInterfaces auto ++UpInterfaces auto + + ### pause_audio + # PauseAudio yes +@@ -98,6 +103,8 @@ + ### programs + # IncompatiblePrograms xmms + ++IncompatiblePrograms pppd ++ + ### services + # RestartServices laptop_mode + # StopServices alsasound +diff -ur hibernate-script-1.91/scriptlets.d/network hibernate-script-1.91.lfs/scriptlets.d/network +--- hibernate-script-1.91/scriptlets.d/network 2006-06-05 17:20:38.000000000 +0600 ++++ hibernate-script-1.91.lfs/scriptlets.d/network 2006-07-10 15:58:31.000000000 +0600 +@@ -20,7 +20,7 @@ + ret=0 + do_auto= + case $NETWORK_DOWNIFS in *\ auto\ *) do_auto=yes ;; esac +- for int in `/sbin/ifconfig|sed -e 's/^\([^ \t]*\).*/\1/;/^$/d'` ; do ++ for int in `ip -o link list | cut -d ':' -f 2` ; do + if [ -z "$do_auto" ] ; then + # Only proceed if we were given "auto" or this interface was meant + # to be brought down. +@@ -140,12 +140,12 @@ + network_ifdown() { + /etc/init.d/ifdown $* + } +- elif [ -x "/etc/sysconfig/network-scripts/ifup" ] ; then ++ elif [ -x "/etc/sysconfig/network-devices/ifup" ] ; then + network_ifup() { +- /etc/sysconfig/network-scripts/ifup $* ++ /etc/sysconfig/network-devices/ifup $* + } + network_ifdown() { +- /etc/sysconfig/network-scripts/ifdown $* ++ /etc/sysconfig/network-devices/ifdown $* + } + elif [ -x "/etc/init.d/networking" ] ; then + network_ifup() { -- http://linuxfromscratch.org/mailman/listinfo/livecd FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
