Zu Sicherungszwecken und Dokumentation hier das nächste update:
Neuerungen:
Die # exittrap ist wieder drin und alle 'exit 1' werden jetzt über die cleanupandexit Funktion geleitet.
Sie wird noch eine weitere Aufgabe bekommen siehe nächster Punkt.
Logs: naad loggt jetzt seinen Programm Ablauf.
Die Log Einträge werden hinter das exit 0 notiert, wo sie den Programmablauf nicht beeinflussen..
Zusätzlich zu den eigentlichen Vorteilen des Loggens kann so vermieden werden, dass die Prüfung der Internet Verfügbarkeit, das Paketupdate und die Installation von xorg bei jedem Optionsaufruf erneut stattfinden muss. Die messages die noch für die #exittrap zugewiesen werden sollen, können dann auch ebenso für das Loggen eingesetzt werden.
Option -s hat jetzt zusätzlich die Aufgabe erhalten zu den Softwarepaketen die dann schon installiert sind die passenden Sprachpakete hinzuzufügen.
Option -p ist immer noch nicht fertig, hat aber schon zur Sicherheit eine j/N Abfrage erhalten.
$0 - Install and configure Arch Linux
Usage: $0 [option] [argument]
-a About: $0 (man page)
-d Display configurations
-g <driver> Install a grafik driver
-h Display this help
-k <ll> Set-x11-keymap <language> code
-l <ll_CC> Set <language_COUNTRY> code in locale files
-m <my-host> Set hostname
-p <sdX> Partition a disk and install Arch base (Will delete all data on disk sdX)
-s <ll> Install software and language packages. (Edit 'software=' in UCS first.)
-t <timezone> Set timezone
-u Add a user (Set 'name= and passwd=' in User Configuration Section first)
-v <keymap> Set vconsole keymap
-x <GUI> Configure xorg and Insall a desktop GUI
Example:
$0 -g xf86-video-nouveau -k de -l de_DE -m mein-pc -s de -t Europe/Berlin -u -v de-latin1 -x lxqt
Terminal commands you may need to search for arguments:
g) pacman -Ssq xf86-video nvidia
k) localectl list-x11-keymap-layouts | less
l) cat /etc/locale.gen
p) lsblk or fdisk -l
t) find /usr/share/zoneinfo -type f | less
v) find /usr/share/kbd/keymaps/i386/ -type f | grep <search string>
(Alpha ist noch nicht für Betatester geeignet.)
#!/bin/bash
# naad version 0.5.4 (alpha) under FAFBL 1.0 is a install and configurtion tool for Arch Linux.
# From tuxnix, drcux and LinLin with no garanty at all.
#### User-Configurations-Section ####
root_passwd=secret
user=arch_user
user_passwd=secret
groups=( wheel audio video games power )
packages="sudo aspell hunspell firefox"
#keyboard
model=pc105
variant=nodeadkeys
options=caps:numlock
#vconsole
FONT=lat9w-16
#### The-Script ####
# start as root?
if [ $UID -ne 0 ]; then
sudo bash -c "$0 $*"; exit $?
fi
## Display-Section ##
#about naad
about(){
cat|less << EOF
About $0:
This script is a installation and configuration tool for Arch Linux. Read Arch Wiki if you need some help!
You can use it just to display configurations, as a manual, as a configuratios helper or as a installation tool.
Packages and services you might need but you'll have to install them manualy.
For::
Intel: intel-ucode
WLAN: wpa_supplicant, wireless_tools, dialog
Notebooks: acpid
If you need some of these software packages edit 'software=' in User-Configuration-Section.
To activate acpid.service do a 'systemctl enable --now acpid.service' command on terminal.
Grafik driver - option -g:
Closed NVIDIA driver will need some manual configuration aferwards.
Keyboard - option -k:
As a default model=pc105, variant=nodeadkeys and options=caps:numlock are preselectet. These values will fit to most cases. Edit User Configuration Section if you want to change these values. To search values use the following commands: 'localectl list-x11-keymap-models |less' 'localectl list-x11-keymap-variants |less' localectl list-x11-keymap-options |less.
Locales - /etc/locale.conf - /etc/locale.gen - option -l:
Both files /etc/locale.conf and /etc/locale.gen are configred with the language_COUNTRY code <ll_CC>
To aktivate LC_COLLATE=C (first all little than all big letters) collation behaviour decommend this line in '/etc/locale.conf' file afer you used the -l option.
Partitioniring and Arch base install - option -p:
This partioniering fit's both Bios and UEFI systems. (Grub for BIOS in partition sdX1 (10MB), a boot Partition for UEFI (550MB) sdX2 and a sdX3 partition for rootfs on the rest of the disk). Do a manuel partitioniering if you prefer another constallation (Or edit gdisk in this script).
SSD drives will need a manualy edition of /etc/fstab.
If you need swap volumen you can add a dynamic swap or change gdisk command in this script (printf "o\ny\n n\n\n\n+10M\nEF02\nn\n\n\n+550M\nEF00\nn\n120\n\n+(your RAM size)G\n\nw\ny\n" | gdisk /dev/$sdX) to get a swap partition.
Splitting root-file-system onto diffent disks, can be managed later (mount disks and use genfstab).
Grup will be installed as the most commen boot loader. Change this in the script if you perfer another bootloader.
Sofware - option -s:
It's your choise. Edit User Configuration Section.
Langguage packages will be installed automaticaly.
User - option -u
You have to set a name and password in User Configuration Section. (Now this ist set to: $user - $user_passwd)
The user will become menber of the following groups: $groups
Virtual Console - /etc/vconsole.conf - option -v:
Fonts for virtual console will allways be configerd with 'FONT=lat9w-16' to search for other fonts do 'find /usr/share/kbd/consolefonts -type f | less'. Edit the User Configuration Section.
Xorg and desktop GUI - option -x:
lxde, xfce4, lxqt, plasma and gnome are implemented jet all with a minimal package set.
The first user will get a xorg configuration so that desktop will start with 'startx' command after user login.
Log-Sektion
Under 'exit 0 there are some logs. You can delete these logs form time to time. If 'Internet' and 'Update' are noticed here these checks will not be done by script anymore.
FAQ:
Q: Why no display/login manager is implemented?
A: Some grafikcards and drivers causes trouble in combination with some display managers and desktop-GUI's. It is better system starts first in terminal so you'll get the chance to fix these problems.
Start desktop GUI with 'startx' after user login from terminal. (xorg is configured.) When GUI is running well, install a display manager of your choise.
EOF
}
# Display configurationes
dconf(){
echo ""
echo "----------------------------"
echo "Display some configurations:"
echo "----------------------------"
echo "echo cat /etc/hostname:"
cat /etc/hostname
echo ""
echo "echo cat /etc/locale.conf:"
cat "/etc/locale.conf"
echo ""
echo "echo locale -a"
locale -a
echo ""
echo "echo locale"
locale
echo ""
echo "echo localectl status:"
localectl status
echo ""
echo "echo timedatectl status:"
timedatectl status
echo ""
echo "echo cat /etc/vconsole.conf:"
cat /etc/vconsole.conf
echo ""
}
# help message
usage(){
cat << EOF
$0 - Install and configure Arch Linux
Usage: $0 [option] [argument]
-a About: $0 (man page)
-d Display configurations
-g <driver> Install a grafik driver
-h Display this help
-k <ll> Set-x11-keymap <language> code
-l <ll_CC> Set <language_COUNTRY> code in locale files
-m <my-host> Set hostname
-p <sdX> Partition a disk and install Arch base (Will delete all data on disk sdX)
-s <ll> Install software and language packages. (Edit 'software=' in UCS first.)
-t <timezone> Set timezone
-u Add a user (Set 'name= and passwd=' in User Configuration Section first)
-v <keymap> Set vconsole keymap
-x <GUI> Configure xorg and Insall a desktop GUI
-? Display this help message
Example:
$0 -g xf86-video-nouveau -k de -l de_DE -m mein-pc -s de -t Europe/Berlin -u -v de-latin1 -x lxqt
Terminal commands you may need to search for arguments:
g) pacman -Ssq xf86-video nvidia
k) localectl list-x11-keymap-layouts | less
l) cat /etc/locale.gen
p) lsblk or fdisk -l
t) find /usr/share/zoneinfo -type f | less
v) find /usr/share/kbd/keymaps/i386/ -type f | grep <search string>
EOF
}
## Menu-Section ##
# optargs
while getopts ":adg:hk:l:m:p:s:t:uv:x:" OPTION; do
case $OPTION in
a ) about; exit 1 ;;
d ) dconf; exit 1 ;;
g ) gdriver=$OPTARG ;;
h ) usage; exit 1 ;;
k ) layout=$OPTARG ;;
l ) ll_CC=$OPTARG ;;
m ) myhost=$OPTARG ;;
p ) sdX=$OPTARG ;;
s ) ll=$OPTARG ;;
t ) timezone=$OPTARG ;;
u ) $OPTARG ;;
v ) vconsole=$OPTARG ;;
x ) desktop=$OPTARG ;;
\? ) echo "The option -$OPTARG is not guilty."; exit 1 ;;
: ) echo "Option -$OPTARG requires an argument!"; exit 1 ;;
esac
done
# check if a option is set
option=("$@")
if [[ ${option[0]}"x" == "x" ]]; then
echo "Choose an option!"; exit 1
fi
## Funktion-Section ##
# exittrap
trap cleanupandexit 1 2 3 15
cleanupandexit()
{
exit 1
}
# Internet Connection
intcon(){
echo ""
echo "Test internet connection..."
if ( ! ping -qc1 www.archlinux.org ); then
echo "Exit! For option -g, -s and -x internet connection is needed."; cleanupandexit
else
printf "log=`date --date=now` - Succsess: Internet Connection\n" >> $0
fi
}
# package update
packupdate(){
echo ""
echo "Exec: pacman --noconfirm -Syu..."
pacman --noconfirm -Syu
#auf Fehlercode prüfen. Hier wird bis jetzt nur eine Ausgabe gemacht!
printf "log=`date --date=now` - Succsess: Package Update\n" >> $0
}
xorginstall(){
echo ""
echo "Exec: pacman -S --needed --noconfirm xorg-server xorg-xinit..."
pacman -S --needed --noconfirm xorg-server xorg-xinit
#auf Fehlercode prüfen. Hier wird bis jetzt nur eine Ausgabe gemacht!
printf "log=`date --date=now` - Succsess: Install xorg\n" >> $0
}
## Exec-Option-Section ##
# check argumentes - option -g
for opt in ${option[@]}; do
if [[ $opt == -g ]]; then
declare -a grafikdrivers=("xf86-video-amdgpu" "xf86-video-ati" "xf86-video-dummy" "xf86-video-fbdev" "xf86-video-intel" "xf86-video-nouveau" "xf86-video-openchrome" "xf86-video-sisusb" "xf86-video-vesa" "xf86-video-vmware" "xf86-video-voodoo" "xf86-video-qxl")
echo ""
for (( i=1; i<12; i++ )); do
if [[ ${grafikdrivers[$i]} != $gdriver ]]; then
nodriver=0
elif [[ ${grafikdrivers[$i]} == $gdriver ]]; then
yesdrive=1
fi
done
fi
done
if [[ $yesdrive == 0 ]]; then
echo "Argument '$gdriver' is not listed in $0 as a free grafik-driver."
echo "Perhaps you need one of these:"
for (( i=1; i<12; i++ )); do
echo $i") " ${grafikdrivers[$i]}
done
echo ""; cleanupandexit
else
# Install grafikdriver - option -g
if [[ $gdrive == 1 ]]; then
echo "Exec: pacman -S --needed --noconfirm $gdriver..."
pacman -S --needed --noconfirm $gdriver
fi
fi
# edit /etc/hostname - option -h
if [[ $myhost"x" != "x" ]]; then
echo "Exec: echo '$myhost' > /etc/hostname..."
echo $myhost > /etc/hostname
echo "done..."
fi
# keyboard - option -k
for opt in ${option[@]}; do
if [[ $opt == -k ]]; then
echo ""
if ( ! localectl list-x11-keymap-layouts | grep -q "$layout" ) || [[ "$layout" == [a-z] ]]; then
echo "Nothing configured!"
echo "Exec 'localectl list-x11-keymap-layouts | less' to get values for -k option!"
echo ""; cleanupandexit
else
echo "Exec: localectl set-x11-keymap [$layout] [$model] [$variant] [$options]..."
localectl set-x11-keymap [$layout] [$model] [$variant] [$options]
echo "done..."
echo ""
fi
fi
done
# check argumentes option -l
if [[ $ll_CC"x" != "x" ]]; then
if ( ! grep -q "$ll_CC" "/etc/locale.gen" ) || ( [[ "$ll_CC" != [a-z][a-z]_[A-Z][A-Z] ]] && [[ "$ll_CC" != [a-z][a-z][a-z]_[A-Z][A-Z] ]] ); then
echo "Nothing configured. Do 'cat /etc/locale.gen' to get values for -l option!"; cleanupandexit
fi
fi
# edit /etc/locale.gen - option -l
if [[ $ll_CC"x" != "x" ]]; then
# set ll
ll="${ll_CC%_*}"
# edit /etc/locale.conf
#Hier muss noch nachgebessert werden z.B. für tcy_IN.UTF-8 UTF-8
echo "Exec: echo '$ll_CC' > /etc/locale.conf..."
cat > "/etc/locale.conf" << EOF
LANG=$ll_CC.UTF-8
LANGUAGE=$ll_CC:pt:BR
#LC_COLLATE=C
LC_TIME=$ll_CC.UTF-8
LC_PAPER=$ll_CC.UTF-8
LC_MEASUREMENT=$ll_CC.UTF-8
LC_MONETARY=$ll_CC.UTF-8
LC_NUMERIC=$ll_CC.UTF-8
LC_CTYPE=$ll_CC.UTF-8
LC_MESSAGES=$ll_CC.UTF-8
LC_NAME=$ll_CC.UTF-8
LC_ADDRESS=$ll_CC.UTF-8
LC_TELEPHONE=$ll_CC.UTF-8
LC_IDENTIFICATION=$ll_CC.UTF-8
LC_ALL=
EOF
fi
if [[ $ll_CC"x" != "x" ]]; then
# reconfigure /etc/locale.gen.
sed -ie "/#/!s/^/#/" "/etc/locale.gen"
echo "Exec: sed -ie s/#'$ll_CC'/'$ll_CC'/ /etc/locale.gen..."
sed -ie "s/#$ll_CC/$ll_CC/" "/etc/locale.gen"
echo "Exec: sed -ie s/#'en_US.UTF-8 UTF-8'/'en_US.UTF-8 UTF-8'/ "/etc/locale.gen"..."
sed -ie "s/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" "/etc/locale.gen"
echo "Exec: locale-gen..."
echo ""
locale-gen
echo ""
fi
# # Partition disk and install Arch base - option -p
for opt in ${option[@]}; do
if [[ $opt == -p ]]; then
if [[ $sdX != sd[a-z] ]]; then echo "Choose a disk ( sda, sdb, sdc...) for Partitioniering."; cleanupandexit
else
while true; do
#clear
echo "Partiton disk and install Arch Linux base on /dev/$sdX"
echo -n "Caution: All data on /dev/$sdX will be lost! y/N ? "; read f
if [[ "$f" == "n" ]]; then cleanupandexit
elif [[ "$f" == "y" ]]; then echo "Partiton disk $sdX"; break
fi
done
sleep 5
printf "log=`date --date=now` - Starttime" >> $0
printf "o\ny\nn\n\n\n+10M\nEF02\nn\n\n\n+550M\nEF00\nn\n\n\n\n\nw\ny\n" | gdisk /dev/$sdX
echo "Partitioniering done..."
printf "log=`date --date=now` - Succsess: Partitioniering $sdX\n" >> $0
while true; do
#clear
echo -n "Format: mkfs.fat -F32 "/dev/$sdX"2"
echo ""
echo -n "Format: mkfs.ext4 "/dev/$sdX"3 ! y/N ? "; read f
if [[ "$f" == "n" ]]; then cleanupandexit
elif [[ "$f" == "y" ]]; then echo "Partiton disk $sdX"; break
fi
done
sleep 5
echo ""
echo "Format $sdX"
mkfs.fat -F32 "/dev/$sdX"2
echo "y" | mkfs.ext4 -L p_arch "/dev/$sdX"3
sleep 5
echo ""
echo "mount "/dev/$sdX"3 /mnt"
mount /dev/$sdX"3" /mnt
mkdir /mnt/boot
echo "mount "/dev/$sdX"2 /mnt/boot"
mount "/dev/$sdX"2 "/mnt/boot"
sleep 5
echo ""
echo "Edit /etc/pacman.d/mirrorlist"
sed -ie "s/#Server/Server/" "/etc/pacman.d/mirrorlist"
echo "done..."
intcon
echo "pacstrap /mnt base base-devel"
pacstrap /mnt base base-devel
echo "done..."
sleep 5
echo ""
echo "Generate /mnt/etc/fstab"
genfstab -U /mnt >> /mnt/etc/fstab
echo "done..."
sleep 5
echo ""
echo "cat /mnt/etc/fstab"
cat /mnt/etc/fstab
arch-chroot /mnt
echo "systemctl enable --now systemd-timesyncd.service"
systemctl enable --now systemd-timesyncd.service
echo "done..."
sleep 5
echo ""
echo "pacman -Syyu --noconfirm"
pacman -Syyu --noconfirm
echo "done..."
sleep 5
echo ""
while true; do
#clear
echo "Install and configure grub"
echo "BIOS: grub-install"
echo ""
echo -n "UEFI: grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub ? y/N ? "; read f
if [[ "$f" == "n" ]]; then cleanupandexit
elif [[ "$f" == "y" ]]; then echo "Partiton disk $sdX"; break
fi
done
sleep 5
#echo "pacman -S grub"
#pacman -S grub
grub-mkconfig -o /boot/grub/grub.cfg
sleep 5
#Booten per BIOS
echo "grub-install - BIOS"
grub-install
printf "log=`date --date=now` - grub-install (for BIOS)" >> $0
#Booten per UEFI
echo "Install grub - UEFI "
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
printf "log=`date --date=now` - grub-install (UEFI)" >> $0
echo "All done..."
sleep 5
echo ""
echo "exec mkinitcpio -p linux"
mkinitcpio -p linux
echo "done..."
sleep 5
echo "Set root password"
echo -e "$root_passwd'\n'$root_passwd'\n" | (passwd root)
echo "done..."
sleep 5
echo ""
echo "Set hardware clock"
hwclock --systohc && sync
echo "done..."
echo ""
echo "Exit: arch-chroot"
exit
printf "log=`date --date=now` - Exit: arch-chroot" >> $0
echo "done..."
sleep 5
cp $0 /usr/bin && sync
#script_path="$(dirname "$0")"
#script_name="$(basename "$0")"
#cp "${script_path}/${script_name}" "/usr/bin/${script_name}"
umount /mnt/boot
umount /mnt
echo ""
echo "Arch base system is installed."
printf "log=`date --date=now` - Arch base system installed" >> $0
echo "Do a 'reboot' and change bootsequens to $sdX"
echo ""
fi
fi
done
# install software- option -s
for opt in ${option[@]}; do
if [[ $opt == -s ]]; then
if ( ! grep -q "[0-9][0-9][0-9][0-9] - Succsess: Internet Connection" $0 ); then intcon; fi
if ( ! grep -q "[0-9][0-9][0-9][0-9] - Succsess: Package Update" $0 ); then packupdate; fi
echo ""
echo "Exec: pacman -S --needed --noconfirm $packages..."
pacman -S --needed --noconfirm $packages
#Install language packages
echo ""
if ( ! localectl list-x11-keymap-layouts | grep -q "$ll" ) || [[ "$ll" == [a-z] ]]; then
echo "No language package installed!"
echo "You need a language code."
echo "Exec 'localectl list-x11-keymap-layouts | less' to get values for -k option!"
echo ""; cleanupandexit
else
echo "Install language packages"
declare -a pack=( man-pages aspell gimp hunspell firefox libreoffice libreoffice-fresh libreoffice-still thunderbird thunderbird plasma bluegriffon hyphen kompozer )
if ( pacman -Qsq man-pages 1> /dev/null ); then langpack[0]=man-pages-$ll; fi
if ( pacman -Qsq aspell 1> /dev/null ); then langpack[1]=aspell-$ll; fi
if ( pacman -Qsq gimp 1> /dev/null ); then langpack[2]=gimp-help-$ll; fi
if ( pacman -Qsq hunspell 1> /dev/null ); then langpack[3]=hunspell-$ll; fi
if ( pacman -Qsq firefox 1> /dev/null ); then langpack[4]=firefox-i18n-$ll; fi
if ( pacman -Qsq libreoffice-fresh 1> /dev/null ); then langpack[5]=libreoffice-fresh-$ll; fi
if ( pacman -Qsq libreoffice-still 1> /dev/null ); then langpack[6]=libreoffice-still-$ll; fi
if ( pacman -Qsq thunderbird 1> /dev/null ); then langpack[7]=thunderbird-i18n-$ll; fi
if ( pacman -Qsq thunderbird 1> /dev/null ); then langpack[8]=kde-l10n-$ll; fi
#if ( pacman -Qsq bluegriffon ); then langpack[9]=bluegriffon-i18n-$ll; fi
if ( pacman -Qsq hyphen 1> /dev/null ); then langpack[10]=hyphen-$ll; fi
if ( pacman -Qsq kompozer 1> /dev/null ); then langpack[11]=kompozer-i18n-$ll; fi
pacman -Sq --needed --noconfirm ${langpack[@]}
fi
fi
done
# ln /etc/localtime - option -t
for opt in ${option[@]}; do
if [[ $opt == -t ]]; then
if ( ! find "/usr/share/zoneinfo/" -type f | grep -wq "$timezone" ); then
echo "Argument in -t is not guilty!"; echo "Find timezone, with: 'find /usr/share/zoneinfo -type f | less'"; cleanupandexit
else
echo "Exec: ln -sf /usr/share/zoneinfo/'$timezone' /etc/localtime..."
ln -sf /usr/share/zoneinfo/$timezone /etc/localtime
echo "done..."
echo ""
fi
fi
done
# Add a user - option -u
for opt in ${option[@]}; do
if [[ $opt == -u ]]; then
if [[ $user"x" == "x" ]]; then
echo ""
echo "Set a user-name in User Configuration Section"
echo ""; cleanupandexit
elif [[ $user_passwd"x" == "x" ]]; then
echo ""
echo "Set a user-password in User Configuration Section"
echo ""; cleanupandexit
elif [[ $user"x" != "x" ]] && [[ $user_passwd"x" != "x" ]]; then
echo "Add user with name: $user"
useradd -m -g users -s /bin/bash $user
printf $user_passwd"\n"$user_passwd"\n" | passwd $user
for group in ${groups[@]}; do
gpasswd -a "$user" "$group"
done
echo ""
echo "Activate wheel /etc/sudoers"
sed 's/#%wheel ALL=(ALL) ALL /%wheel ALL=(ALL) ALL_/' "/etc/sudoers" 1> /dev/null
echo "done..."
echo ""
fi
fi
done
#userdel -r $user
# check argumentes option -v
for opt in ${option[@]}; do
if [[ $opt == -v ]]; then
if ( ! find "/usr/share/kbd/keymaps/i386/" -type f | grep -qw "$vconsole" ); then
echo "Wrong argument in option -v! Find keyboard map, with: 'find /usr/share/kbd/keymaps/i386/ -type f | grep' <search string>'"; cleanupandexit
else
echo "Exec: echo 'KEYMAP=$vconsole' > /etc/vconsole.conf..."
echo KEYMAP="$vconsole" > "/etc/vconsole.conf"
echo "Exec: echo 'FONT=$FONT' > /etc/vconsole.conf..."
echo FONT=$FONT >> "/etc/vconsole.conf"
echo "done..."
echo ""
fi
fi
done
# Install desktop GUI -option -x
for opt in ${option[@]}; do
if [[ $opt == -x ]]; then
if [[ $desktop == lxde ]]; then
packages="openbox lxsession lxpanel lxde-common lxde-icon-theme"
elif [[ $desktop == xfce ]]; then
packages="openbox xfce4-session xfce4-panel human-icon-theme xfce4-terminal"
elif [[ $desktop == lxqt ]]; then
packages="openbox lxqt-session lxqt-panel breeze-icons"
elif [[ $desktop == plasma ]]; then
packages="kwin plasma-desktop plasma-wayland-session plasma-nm plasma-pa breeze"
elif [[ $desktop == gnome ]]; then
packages="mutter gnome-desktop gnome-session networkmanager gnome-themes-standard nm-connection-editor gnome-control-center gnome-shell"
else
echo ""; echo "A desktop GUI '$desktop' is not known in $0."
echo "Choose 'lxde', 'xfce4', 'lxqt', 'plasma', 'gnome' or install another GUI manualy."; echo ""; cleanupandexit
fi
if ( ! grep -q "[0-9][0-9][0-9][0-9] - Succsess: Internet Connection" $0 ); then intcon; fi
if ( ! grep -q "[0-9][0-9][0-9][0-9] - Succsess: Package Update" $0 ); then packupdate; fi
if ( ! grep -q "[0-9][0-9][0-9][0-9] - Succsess: Install xorg" $0 ); then xorginstall; fi
echo ""
echo "Exec: pacman -S --needed --noconfirm $packages..."
pacman -S --needed --noconfirm $packages
fi
done
#sed -n 'd/log=Do/lala/' $0
exit 0
# Ausstehende Arbeiten:
# option -p fertigstellen
# option -l splitten
# del logs option schreiben
# Logs noch weiter ausbauen
log=Do 15. Feb 11:57:18 CET 2018 - Starttimelog=Do 15. Feb 11:57:18 CET 2018 - Succsess: Partitioniering sdh
log=Do 15. Feb 12:02:40 CET 2018 - Starttimelog=Do 15. Feb 12:02:40 CET 2018 - Succsess: Partitioniering sdh
log=Do 15. Feb 12:04:49 CET 2018 - Starttimelog=Do 15. Feb 12:04:49 CET 2018 - Succsess: Partitioniering sdh
log=Do 15. Feb 15:23:05 CET 2018 - Starttimelog=Do 15. Feb 15:23:07 CET 2018 - Succsess: Partitioniering sdc
log=Do 15. Feb 15:28:22 CET 2018 - Starttimelog=Do 15. Feb 15:28:23 CET 2018 - Succsess: Partitioniering sdc
log=Do 15. Feb 15:33:01 CET 2018 - Starttimelog=Do 15. Feb 15:33:03 CET 2018 - Succsess: Partitioniering sdc
log=Do 15. Feb 15:33:40 CET 2018 - grub-install (for BIOS)log=Do 15. Feb 15:33:40 CET 2018 - grub-install (UEFI)
log=Fr 16. Feb 01:06:44 CET 2018 - Succsess: Internet Connection
log=Fr 16. Feb 01:06:46 CET 2018 - Succsess: Package Update