From ba09f592c8ee7dc388eb63223bbbd7002eb803bc Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Thu, 20 Dec 2007 21:33:45 +0000 Subject: [PATCH] Added TuxOnIce support to initscripts svn path=/nixos/trunk/; revision=9960 --- boot/boot-stage-1-init.sh | 5 ++++- boot/boot-stage-2-init.sh | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/boot/boot-stage-1-init.sh b/boot/boot-stage-1-init.sh index 79c1c3ff418f..b7b558971a6c 100644 --- a/boot/boot-stage-1-init.sh +++ b/boot/boot-stage-1-init.sh @@ -32,7 +32,6 @@ mount -t proc none /proc mkdir -p /sys mount -t sysfs none /sys - # Process the kernel command line. stage2Init=@stage2Init@ for o in $(cat /proc/cmdline); do @@ -64,6 +63,10 @@ for i in @modules@; do modprobe $i done +# Try to resume - all modules are loaded now +echo 0 > /sys/power/tuxonice/user_interface/enabled +echo 1 > /sys/power/tuxonice/do_resume || echo Failed to resume..; + # Create device nodes in /dev. mknod -m 0666 /dev/null c 1 3 diff --git a/boot/boot-stage-2-init.sh b/boot/boot-stage-2-init.sh index 2e19f23cb854..a76873fc52cf 100644 --- a/boot/boot-stage-2-init.sh +++ b/boot/boot-stage-2-init.sh @@ -114,6 +114,7 @@ export MODULE_DIR=@kernel@/lib/modules/ # Run any user-specified commands. @shell@ @bootLocal@ +mkswap $(cat /sys/power/tuxonice/resume) || echo 'Failed to clear saved image.' # Start Upstart's init. We start it through the # /var/run/current-system symlink indirection so that we can upgrade