From 7d94828393cc26fbb4951f88794bf8d7636fbc81 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Mon, 5 Aug 2013 15:48:09 -0500 Subject: setup_env.sh: add su -c to commands to work when run not as root. --- setup_env.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup_env.sh b/setup_env.sh index 1d80511..3c40231 100755 --- a/setup_env.sh +++ b/setup_env.sh @@ -168,7 +168,7 @@ then exit 1 fi #clear out the default resolve.conf -mv -f ../build_root.$ARCH/etc/resolv.conf ../build_root.$ARCH/etc/resolv.conf.orig +su -c "mv -f ../build_root.$ARCH/etc/resolv.conf ../build_root.$ARCH/etc/resolv.conf.orig" if [ x$FOUNDTEMPLATE = xTRUE ] then @@ -188,8 +188,8 @@ fi #create custom enter_dev_chroot.sh script #sed -e "s/REPLACEME/$ARCH/g" templates/enter_dev_chroot.sh > ../enter_dev_chroot.$ARCH.sh -cp templates/enter_dev_chroot.sh ../enter_dev_chroot.$ARCH -chmod 755 ../enter_dev_chroot.$ARCH +su -c "cp templates/enter_dev_chroot.sh ../enter_dev_chroot.$ARCH" +su -c "chmod 755 ../enter_dev_chroot.$ARCH" printf "%s\n" "********************************************************" printf "** %-50s **\n" " To enter the chroot (build_root.$ARCH) run:" @@ -204,9 +204,9 @@ printf "** %-50s **\n" " (it will error out but thats ok) " printf "%s\n" "********************************************************" #copy makepkg.conf into the chroot -sed -e "s/REPLACEME/$ARCH/g" templates/makepkg.conf > ../build_root.$ARCH/etc/makepkg.conf +su -c "sed -e "s/REPLACEME/$ARCH/g" templates/makepkg.conf > ../build_root.$ARCH/etc/makepkg.conf" #copy pacman.conf into the chroot -sed -e "s/REPLACEME/$ARCH/g" templates/pacman.conf.chroot > ../build_root.$ARCH/etc/pacman.conf +su -c "sed -e "s/REPLACEME/$ARCH/g" templates/pacman.conf.chroot > ../build_root.$ARCH/etc/pacman.conf" cd .. -- cgit v0.12