From 963e7432c089c6067ecaade146f1a243370100e9 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 23 Apr 2013 17:10:53 -0400 Subject: hooks/memdisk: scope variables, use newer syntax Signed-off-by: Dave Reisner --- hooks/memdisk | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hooks/memdisk b/hooks/memdisk index e3ff345..62790b4 100644 --- a/hooks/memdisk +++ b/hooks/memdisk @@ -1,11 +1,14 @@ -# vim:set ft=sh: -run_hook () -{ - MEMDISK=$(memdiskfind) - if [ $? -eq 0 ]; then +#!/usr/bin/ash + +run_hook() { + local disk + + if disk=$(memdiskfind); then # We found a memdisk, set up phram - modprobe phram phram=memdisk,${MEMDISK} + modprobe phram phram="memdisk,$disk" # Load mtdblock, the memdisk will be /dev/mtdblock0 modprobe mtdblock fi } + +# vim: set ft=sh ts=4 sw=4 et: -- cgit v1.2.3-24-g4f1b