From d20320548436c28bc7dd768a8f4452a0755d0386 Mon Sep 17 00:00:00 2001 From: simono41 Date: Thu, 10 May 2018 03:47:10 +0200 Subject: [PATCH] fix --- arch-install | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch-install b/arch-install index d824412..18343d3 100755 --- a/arch-install +++ b/arch-install @@ -12,6 +12,7 @@ version="${2}" hostname="$(cat /etc/hostname)" [[ -z "${version}" ]] && version="${hostname#*-}" + if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" 1>&2 sudo "$0" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" 2>&1 | tee /home/user1/install.log @@ -704,15 +705,15 @@ function systemdboot() { arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l /EFI/systemd/systemd-bootx64.efi -L "Linux Boot Manager" - arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \${linuz} -L "Arch Linux efistub" -u "initrd=/${kernel} root=${tobootdevice} rw ${parameter}quiet splash" + arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \\${linuz} -L "Arch Linux efistub" -u "initrd=/${kernel} root=${tobootdevice} rw ${parameter}quiet splash" fi if [ "${version}" == "manjaro" ]; then cp /opt/${repo}/update-bootloader ${mountpoint}/usr/bin/update-bootloader chmod +x ${mountpoint}/usr/bin/update-bootloader - if ! grep '${mountpoint}/usr/bin/update-bootloader' $RCLOCALSHUTDOWN; then - echo "${mountpoint}/usr/bin/update-bootloader" >> ${mountpoint}/etc/rc.local.shutdown + if ! grep '/usr/bin/update-bootloader' $RCLOCALSHUTDOWN; then + echo "${mountpoint}/usr/bin/update-bootloader" >> $RCLOCALSHUTDOWN fi fi @@ -894,6 +895,8 @@ function abfrage() { fi fi + RCLOCALSHUTDOWN='${mountpoint}/etc/rc.local.shutdown' + # Partitionierung if [ "${m2ssddevice}" == "y" ]; then