adding user root check
This commit is contained in:
parent
2c1397053c
commit
e28f8cd12f
|
|
@ -8,7 +8,7 @@ if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "ERROR! Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make_boot() {
|
make_boot() {
|
||||||
|
|
@ -225,7 +225,7 @@ if [[ "$(grep -E "$MOUNTPOINT" /proc/mounts -c)" -eq "0" ]]; then
|
||||||
echo "Rebooting in 2 Seconds ..." && sleep 1
|
echo "Rebooting in 2 Seconds ..." && sleep 1
|
||||||
echo "Rebooting in 1 Second ..." && sleep 1
|
echo "Rebooting in 1 Second ..." && sleep 1
|
||||||
# reboot now
|
# reboot now
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Arch Install on Main Drive"
|
echo "Arch Install on Main Drive"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "ERROR! Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "basic installations"
|
echo "basic installations"
|
||||||
|
|
@ -190,7 +190,7 @@ systemd)
|
||||||
echo -e "default arch\ntimeout\t5" >/boot/loader/loader.conf
|
echo -e "default arch\ntimeout\t5" >/boot/loader/loader.conf
|
||||||
else
|
else
|
||||||
echo "ERROR! Systemd-boot is not supported for BIOS systems"
|
echo "ERROR! Systemd-boot is not supported for BIOS systems"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
uefi)
|
uefi)
|
||||||
|
|
@ -209,7 +209,7 @@ uefi)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "ERROR! efistub is not supported for BIOS systems"
|
echo "ERROR! efistub is not supported for BIOS systems"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
none)
|
none)
|
||||||
|
|
@ -221,7 +221,7 @@ none)
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "Adding User and hostname"
|
echo "Adding User and hostname"
|
||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" -eq "0" ]; then
|
||||||
if [[ "$LAYOUT" -eq 1 ]]; then
|
if [[ "$LAYOUT" -eq 1 ]]; then
|
||||||
groupadd libvirt
|
groupadd libvirt
|
||||||
useradd -m -G wheel,libvirt -s /bin/bash "$USERNAME"
|
useradd -m -G wheel,libvirt -s /bin/bash "$USERNAME"
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,14 @@ if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "ERROR! Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_aur() {
|
install_aur() {
|
||||||
"$AURHELPER" -S --noconfirm --needed "$@"
|
"$AURHELPER" -S --noconfirm --needed "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd ~ || exit 1
|
cd ~ || exit 0
|
||||||
case "$AURHELPER" in
|
case "$AURHELPER" in
|
||||||
"yay")
|
"yay")
|
||||||
install_pkg "go"
|
install_pkg "go"
|
||||||
|
|
@ -44,9 +44,9 @@ case "$AURHELPER" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
cd "$AURHELPER" || exit 1
|
cd "$AURHELPER" || exit 0
|
||||||
makepkg -si --noconfirm
|
makepkg -si --noconfirm
|
||||||
cd ~ || exit 1
|
cd ~ || exit 0
|
||||||
|
|
||||||
while IFS= read -r LINE; do
|
while IFS= read -r LINE; do
|
||||||
echo "INSTALLING: $LINE"
|
echo "INSTALLING: $LINE"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ if [[ -f "$CONFIG_FILE" ]]; then
|
||||||
source "$CONFIG_FILE"
|
source "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "ERROR! Missing file: setup.conf"
|
echo "ERROR! Missing file: setup.conf"
|
||||||
exit 1
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$LAYOUT" -eq 1 || "$BOOTLOADER" =~ "grub" ]]; then
|
if [[ "$LAYOUT" -eq 1 || "$BOOTLOADER" =~ "grub" ]]; then
|
||||||
|
|
@ -18,7 +18,7 @@ if [[ "$LAYOUT" -eq 1 || "$BOOTLOADER" =~ "grub" ]]; then
|
||||||
echo -e "Creating the theme directory..."
|
echo -e "Creating the theme directory..."
|
||||||
mkdir -p "${THEME_DIR}/${THEME_NAME}"
|
mkdir -p "${THEME_DIR}/${THEME_NAME}"
|
||||||
echo -e "Copying the theme..."
|
echo -e "Copying the theme..."
|
||||||
cd "$HOME"/ArchTitus || exit 1
|
cd "$HOME"/ArchTitus || exit 0
|
||||||
cp -a ${THEME_NAME}/* ${THEME_DIR}/${THEME_NAME}
|
cp -a ${THEME_NAME}/* ${THEME_DIR}/${THEME_NAME}
|
||||||
echo -e "Backing up Grub config..."
|
echo -e "Backing up Grub config..."
|
||||||
cp -an /etc/default/grub /etc/default/grub.bak
|
cp -an /etc/default/grub /etc/default/grub.bak
|
||||||
|
|
@ -60,4 +60,4 @@ rm -r /root/ArchTitus
|
||||||
rm -r /home/"$USERNAME"/ArchTitus
|
rm -r /home/"$USERNAME"/ArchTitus
|
||||||
|
|
||||||
# Replace in the same state
|
# Replace in the same state
|
||||||
cd "$(pwd)" || exit 1
|
cd "$(pwd)" || exit 0
|
||||||
Loading…
Reference in New Issue