summaryrefslogtreecommitdiff
path: root/librechroot
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-02-01 10:22:03 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-02-01 10:22:03 -0300
commit6ffbc1e991fdcc7b014ec6ea4b42d467aaba15c5 (patch)
tree679331ea849d14c2ea628c12ee0d8db7d5566703 /librechroot
parentc34ac4ff95f046a2be5d0ab41c08b2734c47f602 (diff)
hiding error messages
Diffstat (limited to 'librechroot')
-rwxr-xr-xlibrechroot9
1 files changed, 3 insertions, 6 deletions
diff --git a/librechroot b/librechroot
index 9532214..688d8d2 100755
--- a/librechroot
+++ b/librechroot
@@ -30,12 +30,9 @@
exit 2
}
+source /etc/libretools.conf
custom_config=$XDG_CONFIG_HOME/libretools/libretools.conf
-if [ -e $custom_config ]; then
- source $custom_config
-else
- source /etc/libretools.conf
-fi
+[[ -e $custom_config ]] && source $custom_config
[[ ! -d $CHROOTDIR/$1/ ]] && {
echo "There's no $CHROOTDIR/$1"
@@ -46,7 +43,7 @@ mount -t proc proc $CHROOTDIR/$1/proc/
mount -t sysfs sys $CHROOTDIR/$1/sys/
mount -o bind /dev $CHROOTDIR/$1/dev/
-cp -L /etc/resolv.conf $CHROOTDIR/$1/etc/resolv.conf
+cp -L /etc/resolv.conf $CHROOTDIR/$1/etc/resolv.conf >/dev/null 2>&1
chroot $CHROOTDIR/$1 /bin/bash