From 31f80cc8dad59014a7bce8a766d1f790801986fb Mon Sep 17 00:00:00 2001 From: fbt Date: Mon, 5 Jan 2015 22:32:29 +0300 Subject: [PATCH] avoid heredocs, they don't work on a fully readonly VFS --- rc.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rc.in b/rc.in index 10173d2..b3cc208 100755 --- a/rc.in +++ b/rc.in @@ -33,14 +33,14 @@ rc.tmpdirs() { rc.mount_misc() { for m in "${cfg_mounts[@]}"; do - IFS=':' read fs fs_type mountpoint mount_options <<< "$m" + echo "$m" | while IFS=':' read fs fs_type mountpoint mount_options; do + [[ "$mount_options" ]] || { mount_options='defaults'; } - [[ "$mount_options" ]] || { mount_options='defaults'; } - - mountpoint -q "$mountpoint" || { - [[ -d "$mountpoint" ]] || { mkdir -p "$mountpoint"; } - mount "$fs" -n -t "$fs_type" -o "$mount_options" "$mountpoint" - } + mountpoint -q "$mountpoint" || { + [[ -d "$mountpoint" ]] || { mkdir -p "$mountpoint"; } + mount "$fs" -n -t "$fs_type" -o "$mount_options" "$mountpoint" + } + done done }