variable username
This commit is contained in:
parent
bd73ea5e5e
commit
8501b68e5d
28
chscript.sh
28
chscript.sh
@ -1,23 +1,33 @@
|
|||||||
|
|
||||||
|
echo "Enter username"
|
||||||
|
|
||||||
|
read userName
|
||||||
|
|
||||||
|
echo "Enter hostname"
|
||||||
|
|
||||||
|
read hostName
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
timedatectl set-timezone Europe/Vilnius
|
timedatectl set-timezone Europe/Vilnius
|
||||||
|
|
||||||
locale-gen
|
locale-gen
|
||||||
echo LANG=en_US.UTF-8 > /etc/locale.conf
|
echo LANG=en_US.UTF-8 > /etc/locale.conf
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
|
|
||||||
echo blue > /etc/hostname
|
echo $hostName > /etc/hostname
|
||||||
|
|
||||||
echo "127.0.0.1 localhost" >> /etc/hosts
|
echo "127.0.0.1 localhost" >> /etc/hosts
|
||||||
echo "::1 localhost" >> /etc/hosts
|
echo "::1 localhost" >> /etc/hosts
|
||||||
echo "127.0.1.1 blue" >> /etc/hosts
|
echo "127.0.1.1 $hostName" >> /etc/hosts
|
||||||
|
|
||||||
useradd -m blue
|
useradd -m $userName
|
||||||
|
|
||||||
echo "Root password"
|
echo "Root password"
|
||||||
passwd
|
passwd
|
||||||
|
|
||||||
echo "Blue password"
|
echo "$userName password"
|
||||||
passwd blue
|
passwd $userName
|
||||||
|
|
||||||
|
|
||||||
echo "Does this build use EFI? [y/N]"
|
echo "Does this build use EFI? [y/N]"
|
||||||
@ -27,7 +37,7 @@ read efiCheck
|
|||||||
if [[ $efiCheck == y ]]; then
|
if [[ $efiCheck == y ]]; then
|
||||||
fdisk -l
|
fdisk -l
|
||||||
echo "Enter the boot device name /dev/..."
|
echo "Enter the boot device name /dev/..."
|
||||||
read $bootdevice
|
read bootdevice
|
||||||
mkdir /boot/efi
|
mkdir /boot/efi
|
||||||
mount /dev/$bootdevice /boot/efi
|
mount /dev/$bootdevice /boot/efi
|
||||||
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
|
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
|
||||||
@ -44,12 +54,12 @@ systemctl enable systemd-resolved
|
|||||||
cd /opt
|
cd /opt
|
||||||
|
|
||||||
git clone https://aur.archlinux.org/yay-git.git
|
git clone https://aur.archlinux.org/yay-git.git
|
||||||
chown -R blue:blue ./yay-git
|
chown -R $userName:$userName ./yay-git
|
||||||
cd ./yay-git
|
cd ./yay-git
|
||||||
|
|
||||||
echo "blue ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
echo "$userName ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
|
||||||
sudo -u blue makepkg -si
|
sudo -u $userName makepkg -si
|
||||||
|
|
||||||
yay -S --noconfirm firefox
|
yay -S --noconfirm firefox
|
||||||
yay -S --noconfirm vlc
|
yay -S --noconfirm vlc
|
||||||
|
Loading…
Reference in New Issue
Block a user