mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-24 14:11:55 +00:00
Update server-setup.sh
Fixes to btrfs
This commit is contained in:
parent
0aee473c50
commit
98f80d4d16
|
@ -665,11 +665,30 @@ systemctl enable NetworkManager.service
|
||||||
echo " NetworkManager enabled"
|
echo " NetworkManager enabled"
|
||||||
|
|
||||||
# @description Edit vconsole.conf and locale.conf for persistence
|
# @description Edit vconsole.conf and locale.conf for persistence
|
||||||
|
# Sometimes the locale and vconsole.conf files are not updated, so we need to force update them manually.
|
||||||
echo -ne "
|
echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Updating vconsole.conf and locale.conf
|
Updating vconsole.conf and locale.conf
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
"
|
"
|
||||||
|
# Ensure /mnt is mounted and necessary directories exist
|
||||||
|
if ! mountpoint -q /mnt; then
|
||||||
|
echo "Mounting the root filesystem..."
|
||||||
|
|
||||||
|
# Mount the correct filesystem
|
||||||
|
if [[ "${FS}" == "btrfs" ]]; then
|
||||||
|
mount -o subvol=@ ${partition3} /mnt
|
||||||
|
elif [[ "${FS}" == "ext4" ]]; then
|
||||||
|
mount -t ext4 ${partition3} /mnt
|
||||||
|
elif [[ "${FS}" == "luks" ]]; then
|
||||||
|
mount -t btrfs /dev/mapper/ROOT /mnt
|
||||||
|
fi
|
||||||
|
|
||||||
|
mount -t proc /mnt/proc
|
||||||
|
mount -t sysfs /mnt/sys
|
||||||
|
mount --bind /dev /mnt/dev
|
||||||
|
fi
|
||||||
|
|
||||||
# Update /etc/vconsole.conf
|
# Update /etc/vconsole.conf
|
||||||
echo "KEYMAP=${KEYMAP}" > /mnt/etc/vconsole.conf
|
echo "KEYMAP=${KEYMAP}" > /mnt/etc/vconsole.conf
|
||||||
|
|
||||||
|
@ -680,6 +699,12 @@ echo "LANG=en_US.UTF-8" > /mnt/etc/locale.conf
|
||||||
echo "Generating locales..."
|
echo "Generating locales..."
|
||||||
arch-chroot /mnt locale-gen
|
arch-chroot /mnt locale-gen
|
||||||
|
|
||||||
|
# Unmount the filesystem
|
||||||
|
umount /mnt/dev
|
||||||
|
umount /mnt/proc
|
||||||
|
umount /mnt/sys
|
||||||
|
umount /mnt
|
||||||
|
|
||||||
echo -ne "
|
echo -ne "
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
Cleaning
|
Cleaning
|
||||||
|
@ -691,4 +716,11 @@ sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: A
|
||||||
# Add sudo rights
|
# Add sudo rights
|
||||||
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
|
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
|
||||||
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
|
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
|
||||||
|
echo -ne "
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
Automated Arch Linux Installer
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
Finished!
|
||||||
|
-------------------------------------------------------------------------
|
||||||
|
"
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue
Block a user