diff options
author | maximilian attems <maks@debian.org> | 2005-10-26 09:05:53 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2005-10-26 09:05:53 +0200 |
commit | a62c8eadea176cc83f83cf1eeeca4aabe59e5a95 (patch) | |
tree | 7875d85a0a424aaffec5080c12c35f0373e9638b /scripts | |
parent | 2002749a483fabac4b0ee32256bd937a1d9effd6 (diff) | |
download | initramfs-tools-a62c8eadea176cc83f83cf1eeeca4aabe59e5a95.tar.gz initramfs-tools-a62c8eadea176cc83f83cf1eeeca4aabe59e5a95.zip |
fix stat usage, which is no longer available in newer busybox.
use awk instead for determinig major_minor.
great patch cures a hang observed on one of my laptops. :-)
patch from Adrian Bridgett <adrian@smop.co.uk>, #335801.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/functions | 6 | ||||
-rwxr-xr-x | scripts/local-premount/suspend | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/scripts/functions b/scripts/functions index 68cfcea..8e82896 100644 --- a/scripts/functions +++ b/scripts/functions @@ -227,9 +227,9 @@ load_modules() if [ -e /sys/power/resume ]; then if [ -e "${resume}" ]; then - major=$((0x$(stat -c%t ${resume}))) - minor=$((0x$(stat -c%T ${resume}))) - echo ${major}:${minor} >/sys/power/resume + major_minor=$(ls -l ${resume} | \ + awk '{printf "0x%x:0x%x", $5, $6}') + echo $major_minor >/sys/power/resume fi fi diff --git a/scripts/local-premount/suspend b/scripts/local-premount/suspend index 6aab596..2e0b43f 100755 --- a/scripts/local-premount/suspend +++ b/scripts/local-premount/suspend @@ -24,7 +24,6 @@ if [ ! -e "${resume}" ]; then fi if [ -e /sys/power/resume ]; then - major=$((0x$(stat -c%t ${resume}))) - minor=$((0x$(stat -c%T ${resume}))) - echo ${major}:${minor} >/sys/power/resume + major_minor=$(ls -l ${resume} | awk '{printf "0x%x:0x%x", $5, $6}') + echo $major_minor >/sys/power/resume fi |