Redirects error messages to stderr and other fixes.

This commit is contained in:
lemniskett 2021-01-04 18:37:53 +07:00
parent 2c05f23998
commit c441cb782d
3 changed files with 4 additions and 16 deletions

View File

@ -18,7 +18,7 @@ checkdep(){
} }
err(){ err(){
echo "$(tput bold)$(tput setaf 1)==> $@ $(tput sgr0)" echo "$(tput bold)$(tput setaf 1)==> $@ $(tput sgr0)" 1>&2
exit 1 exit 1
} }

View File

@ -34,7 +34,7 @@ EOF
} }
err(){ err(){
echo "$(tput bold)$(tput setaf 1)==> $@ $(tput sgr0)" echo "$(tput bold)$(tput setaf 1)==> $@ $(tput sgr0)" 1>&2
exit 1 exit 1
} }
@ -65,19 +65,7 @@ case $1 in
checkdep sed checkdep sed
sed -i 's/CheckSpace/#CheckSpace/g' $CHROOT/etc/pacman.conf sed -i 's/CheckSpace/#CheckSpace/g' $CHROOT/etc/pacman.conf
msg "Mounting necessary filesystems..." msg "Mounting necessary filesystems..."
mount -R /home $CHROOT/home /usr/local/share/archbox/bin/archboxinit start
mount -t proc /proc $CHROOT/proc
mount -R /tmp $CHROOT/tmp
mount -R /sys $CHROOT/sys
mount -R /dev $CHROOT/dev
[[ $MOUNT_RUN = "yes" ]] && mount -R /run $CHROOT/run
mount --make-rslave $CHROOT/dev
mount --make-rslave $CHROOT/sys
mkdir -p $CHROOT/var/lib/dbus
mount -R /var/lib/dbus $CHROOT/var/lib/dbus
mkdir -p $CHROOT/lib/modules
mount -R /lib/modules $CHROOT/lib/modules
mount -R /boot $CHROOT/boot
cp /usr/local/share/archbox/chroot_setup.bash $CHROOT/chroot_setup cp /usr/local/share/archbox/chroot_setup.bash $CHROOT/chroot_setup
echo $USER > /tmp/archbox_user echo $USER > /tmp/archbox_user
chroot $CHROOT /bin/bash -c "/chroot_setup" chroot $CHROOT /bin/bash -c "/chroot_setup"

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
err(){ err(){
echo "$(tput bold)$(tput setaf 1)==> $@ $(tput sgr0)" echo "$(tput bold)$(tput setaf 1)==> $@ $(tput sgr0)" 1>&2
exit 1 exit 1
} }