From 9941a7eef9a5102c50891f5cae8b5879247590ec Mon Sep 17 00:00:00 2001 From: Tomas M Date: Wed, 19 Sep 2012 01:54:29 -0500 Subject: [PATCH] fixes --- initramfs/init | 2 +- livekitlib | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/initramfs/init b/initramfs/init index 0074dd7..a1c141a 100644 --- a/initramfs/init +++ b/initramfs/init @@ -25,7 +25,7 @@ init_zram init_union "$CHANGES" "$UNION" # find data dir with filesystem bundles -DATA="$(find_data 60 $DATAMNT)" +DATA="$(find_data 60 "$DATAMNT")" # copy to RAM if needed diff --git a/livekitlib b/livekitlib index 53d0791..af73449 100644 --- a/livekitlib +++ b/livekitlib @@ -42,6 +42,12 @@ log() echo "$@" 2>/dev/null >>/var/log/livedbg } +echolog() +{ + echo "$@" + log "$@" +} + # show information about the debug shell show_debug_banner() { @@ -198,12 +204,12 @@ device_bestfs() # find_data_try() { - debug_log "find_data" + debug_log "find_data_try" local DEVICE FS MNT mkdir -p "$1" - blkid | sort | cut -d: -f 1 | while read DEVICE; do + blkid | sort | cut -d: -f 1 | grep -E -v "/loop|/ram|/zram" | while read DEVICE; do FS="$(device_bestfs "$DEVICE")" mount -r "$DEVICE" "$1" $FS if [ -d "$1/$LIVEKITNAME" ]; then @@ -221,16 +227,22 @@ find_data_try() # find_data() { + debug_log "find_data" + local DATA + echo -n "Looking for $LIVEKITNAME data .." >&2 for timeout in $(seq 1 $1); do + echo -n "." >&2 DATA="$(find_data_try "$2")" if [ "$DATA" != "" ]; then echo "$DATA" + echo "" >&2 return fi sleep 1 done + echo "" >&2 } # Mount squashfs filesystem bundles