summaryrefslogtreecommitdiff
path: root/pm/sleep.d/01grub
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-02-16 14:52:33 -0600
committerVictor Lowther <victor.lowther@gmail.com>2008-02-16 14:52:33 -0600
commit65c84de480fb3565978e8a0778d53023a242ea95 (patch)
treecdf3f6ceb0274ce43140bcba525f0aef65c75c0f /pm/sleep.d/01grub
parent8672d50c1fca29b2bbaedf90b5c27a319952717c (diff)
parent28f4915e717fbc31b5410f77bf7882928def0545 (diff)
Merge branch 'master' into stabilizaton
Diffstat (limited to 'pm/sleep.d/01grub')
-rw-r--r--pm/sleep.d/01grub33
1 files changed, 16 insertions, 17 deletions
diff --git a/pm/sleep.d/01grub b/pm/sleep.d/01grub
index 649a2b6..7fa356a 100644
--- a/pm/sleep.d/01grub
+++ b/pm/sleep.d/01grub
@@ -2,25 +2,24 @@
default_resume_kernel()
{
- case $(uname -m) in
- i?86|x86_64|athlon)
- ;;
- *) # this is only valid for x86 and x86_64
- return $NA
- ;;
- esac
+ case $(uname -m) in
+ i?86|x86_64|athlon)
+ ;;
+ *) # this is only valid for x86 and x86_64
+ return $NA
+ ;;
+ esac
- [ -x /sbin/grubby -a -x /sbin/grub ] || return $NA
- [ -e "/boot/vmlinuz-$(uname -r)" ] || return 1
+ [ -x /sbin/grubby -a -x /sbin/grub ] || return $NA
+ [ -e "/boot/vmlinuz-$(uname -r)" ] || return 1
+ out=$(/sbin/grubby --info /boot/vmlinuz-$(uname -r) |grep index)
+ [ -n "${out}" ] || return 1
+ current=${out#index=}
+ echo "savedefault --default=${current} --once" | \
+ /sbin/grub --device-map=/boot/grub/device.map \
+ --batch --no-floppy --no-curses >/dev/null
- out=$(/sbin/grubby --info /boot/vmlinuz-$(uname -r) |grep index)
- [ -n "${out}" ] || return 1
- current=${out#index=}
- echo "savedefault --default=${current} --once" | \
- /sbin/grub --batch --no-floppy --device-map=/boot/grub/device.map \
- --no-curses >/dev/null
-
- return 0
+ return 0
}
case "$1" in