diff --git a/boot/boot-stage-1-init.sh b/boot/boot-stage-1-init.sh index 79c1c3ff418..b7b558971a6 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 2e19f23cb85..a76873fc52c 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