install.sh
Finished up root/march-chroot.sh Fixed up arguments root/march-reboot.sh Fixed up arguments
This commit is contained in:
@@ -7,8 +7,8 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPTIONS=tlhus
|
||||
LONGOPTS=timezone,locale,hostname,username,sudogrp
|
||||
OPTIONS=t:l:h:u:s:
|
||||
LONGOPTS=timezone:,locale:,hostname:,username:,sudogrp:
|
||||
|
||||
! PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTS --name "$0" -- "$@")
|
||||
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
|
||||
@@ -46,9 +46,28 @@ while true; do
|
||||
sudogrp="$2"
|
||||
shift 2
|
||||
;;
|
||||
--help)
|
||||
echo "
|
||||
Usage: ./install.sh -d [DEVICE] -t [/usr/share/zoneinfo/REGION/CITY] -l [LOCALE] -h [HOSTNAME] -u [USER] -s [SUDO]
|
||||
A small script to automate my archlinux configuration.
|
||||
|
||||
Mandatory arguments:
|
||||
-t | --timezone Your timezone according to /usr/share/zoneinfo/ e.g. "/usr/share/zoneinfo/Europe/Berlin"
|
||||
-l | --locale Your locale according to /etc/locale.gen e.g. "en_US.UTF-8 UTF-8"
|
||||
-h | --hostname Name for your machine e.g. "ArchLinux"
|
||||
-u | --username Your username e.g. "foo"
|
||||
-s | --sudogrp Name of the sudogrp
|
||||
-h | --help This here.
|
||||
"
|
||||
exit 0
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Programming error"
|
||||
exit3
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -82,7 +101,7 @@ linux /vmlinuz-linux
|
||||
initrd /initramfs-linux.img
|
||||
options rw cryptdevice=$(blkid $rootpart | cut -d" " -f2 | tr -d \"):cryptroot root=$cryptroot i8042.noloop i8042.nomux i8042.nopnp i8042.reset" > /boot/loader/entries/arch.conf
|
||||
|
||||
sed -i "s/"
|
||||
sed -i "s/arch-reboot.sh/\0 -u $u-s $s/" /etc/systemd/system/march.service
|
||||
|
||||
systemctl enable march.service
|
||||
systemctl enable dhcpcd.service
|
||||
|
||||
Reference in New Issue
Block a user