Fix lsb_release issue

This commit is contained in:
Augusto Gunsch 2021-08-09 19:33:49 -03:00
parent 246dcf0775
commit 1638ef4111
No known key found for this signature in database
GPG Key ID: F7EEFE29825C72DC
1 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ echo "This script can only be run interactively. Make sure you are in a supporte
echo -e "$AVAILABLE_PLATFORMS"
### SYSTEM ###
DISTRO=$(lsb_release -is)
DISTRO=$(cat /etc/os-release | sed -nE '/^ID=(.*)/\1/p')
INIT_SYS=$(basename $(readlink /bin/init))
quiet ls /sys/firmware/efi/efivars
[ $? -eq 0 ] && UEFI=1 || UEFI=0
@ -137,7 +137,7 @@ install_base() {
print_phase "System installation"
echo -n "Installing base system, kernel, bootloader and vi..."
if [ "$DISTRO" = "Artix" ]; then
if [ "$DISTRO" = "artix" ]; then
quiet basestrap /mnt base base-devel linux linux-firmware grub vi
echo "done"
if [ "$INIT_SYS" = "openrc-init" ]; then
@ -153,7 +153,7 @@ install_base() {
fstabgen -U /mnt >> /mnt/etc/fstab
echo "done"
elif [ "$DISTRO" = "Arch" ]; then
elif [ "$DISTRO" = "arch" ]; then
quiet pacstrap /mnt base linux linux-firmware grub vi
echo "done"
echo -n "Generating fstab..."
@ -174,7 +174,7 @@ configure() {
qpushd /mnt/usr/share/zoneinfo
ln -sf "/mnt/usr/share/zoneinfo/$(fzf --layout=reverse --height=20)" /mnt/etc/localtime
qpopd
[ "$DISTRO" = "Arch" ] && alias chroot="arch-chroot"
[ "$DISTRO" = "arch" ] && alias chroot="arch-chroot"
quiet chroot /mnt hwclock --systohc
echo "Choose locale:"
@ -218,7 +218,7 @@ configure() {
echo "::1 localhost" >> /mnt/etc/hosts
echo "127.0.1.1 $hostname.localdomain $hostname" >> /mnt/etc/hosts
if [ "$DISTRO" = "Artix" ]; then
if [ "$DISTRO" = "artix" ]; then
if [ "$INIT_SYS" = "openrc-init" ]; then
echo "hostname=\"$hostname\"" > /mnt/etc/conf.d/hostname
quiet chroot pacman -S connman-openrc