[arch-projects] [devtools] [PATCH] Fix mkarchroot on non-systemd systems.
Lukas Jirkovsky
l.jirkovsky at gmail.com
Sat Oct 27 09:31:37 EDT 2012
On 17 October 2012 15:13, Lukáš Jirkovský <l.jirkovsky at gmail.com> wrote:
> This fixes the
> "rename .../resolv.conf to .../resolv.conf.pacorig (Device or resource busy)"
> error.
> ---
> mkarchroot.in | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/mkarchroot.in b/mkarchroot.in
> index 7ea90e1..d29dd9d 100644
> --- a/mkarchroot.in
> +++ b/mkarchroot.in
> @@ -131,9 +131,7 @@ chroot_mount() {
> [[ -e "${working_dir}/run" ]] || mkdir "${working_dir}/run"
> mount -t tmpfs tmpfs "${working_dir}/run" -o mode=0755,nodev,nosuid,strictatime,size=64M
>
> - for host_config in resolv.conf localtime; do
> - bind_mount /etc/$host_config ro
> - done
> + bind_mount /etc/localtime ro
> fi
>
> [[ -n $host_mirror_path ]] && bind_mount "$host_mirror_path" ro
> @@ -145,6 +143,7 @@ chroot_mount() {
> }
>
> copy_hostconf () {
> + cp /etc/resolv.conf "${working_dir}/etc/resolv.conf"
> cp -a /etc/pacman.d/gnupg "${working_dir}/etc/pacman.d"
> echo "Server = ${host_mirror}" > ${working_dir}/etc/pacman.d/mirrorlist
>
> @@ -168,9 +167,7 @@ trap_chroot_umount () {
> [[ -n $host_mirror_path ]] && umount "${working_dir}/${host_mirror_path}"
>
> if (( ! have_nspawn )); then
> - for host_config in resolv.conf localtime; do
> - umount "${working_dir}/etc/${host_config}"
> - done
> + umount "${working_dir}/etc/localtime"
> umount "${working_dir}/proc/sys"
> umount "${working_dir}/proc"
> umount "${working_dir}/sys"
> --
> 1.7.12.3
>
Ping. Devtools won't work on systems using initscripts without this
(or similar) patch. There was a discussion about the issue:
https://mailman.archlinux.org/pipermail/arch-general/2012-October/031607.html
Lukas
More information about the arch-projects
mailing list