From ec6264f4da2efc5bb7f2690314f9de0247fd415b Mon Sep 17 00:00:00 2001 From: artoo <flower_of_life@gmx.net> Date: Thu, 25 Sep 2014 23:28:41 +0200 Subject: [PATCH] openrc --- mkmanjaroroot.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mkmanjaroroot.in b/mkmanjaroroot.in index d6fe2b1..f3db46a 100644 --- a/mkmanjaroroot.in +++ b/mkmanjaroroot.in @@ -97,7 +97,7 @@ build_mount_args() { if [[ -n $host_mirror_path ]]; then printf -v p '%q' "$host_mirror_path" if (( $IS_OPENRC ));then - mount_args+=("$p") #-o --bind ro + mount_args+=("$p;--bind -r") else mount_args+=(--bind-ro="$p") fi @@ -105,7 +105,7 @@ build_mount_args() { printf -v p '%q' "${cache_dirs[0]}" if (( $IS_OPENRC ));then - mount_args+=("$p") #--bind + mount_args+=("$p;--bind") else mount_args+=(--bind="$p") fi @@ -114,7 +114,7 @@ build_mount_args() { for cache_dir in ${cache_dirs[@]:1}; do printf -v p '%q' "$cache_dir" if (( $IS_OPENRC ));then - mount_args+=("$p") #-o --bind ro + mount_args+=("$p;--bind -r") else mount_args+=(--bind-ro="$p") fi @@ -160,9 +160,8 @@ chroot_run() { local dir=$1 shift if (( $IS_OPENRC ));then - # the mounting doesn't work properly here for all cases --> readonly for m_arg in ${mount_args[@]};do - mount --bind -o ro "${m_arg}" "${dir}${m_arg}" + mount "${m_arg#*;}" "${m_arg%;*}" "${dir}${m_arg%;*}" done arch-chroot ${dir} ${@} 2>/dev/null -- GitLab