diff --git a/README.md b/README.md index 54c5339..5d31f5e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Easy Slack ! -Pour installer facilement une Slackware 15 fonctionnelle, pour une station de travail avec XFCE ou un serveur sans interface graphique. +Pour installer facilement une Slackware Current fonctionnelle, pour une station de travail avec KDE Plasma ou un serveur sans interface graphique. ## Installation @@ -16,7 +16,7 @@ Ensuite suivre les indications à l’exception des deux points suivant : 1. Au moment de choisir les groupes de paquets à installer, exclure : -* `E/` et `KDE/` pour une station de travail. +* `E/` et `XFCE/` pour une station de travail. * `E/`, `KDE/`, `T/`, `TCL/`, `X/`, `XAP/`, `XFCE/` et `Y/` pour un serveur sans interface graphique. 2. Passer l'installation de `lilo` ou `elilo` comme chargeurs d’amorçage. @@ -50,8 +50,6 @@ Puis l'exécuter : # ./post-install.sh ``` -La machine redémarrera automatiquement une fois le script terminé. - ## Utilisation ### Mise à jour @@ -68,7 +66,8 @@ Soyez vigilant aux paquets mis à jour avant de lancer la mise à jour, si le no 1. Régénérer les modules de noyau `generic`. ``` -# /usr/share/mkinitrd/mkinitrd_command_generator.sh -r | bash +# /usr/share/mkinitrd/mkinitrd_command_generator.sh -r | bash ### The old tool +# geninitrd ``` 2. Ainsi que les entrées du menu de démarrage de `grub`. @@ -79,6 +78,8 @@ Soyez vigilant aux paquets mis à jour avant de lancer la mise à jour, si le no ### SlackBuilds.org +> À adapter pour Slackware Current (installation de `sbotools` désactivée) ! + Vous souhaiteriez des logiciels supplémentaires ? Faites un petit tour sur [SlackBuilds.org](https://slackbuilds.org/) vous y trouverez une collection de scripts de construction de paquets maintenue par la communauté. @@ -99,6 +100,8 @@ Pour plus d'informations `$ man sbotools` ! ### Docker +> Nécessite `sbotools` ! + Installer Docker depuis SlackBuilds.org : ``` # sboinstall docker-cli diff --git a/etc/skel/.bash_profile b/etc/skel/.bash_profile deleted file mode 100644 index 837c53c..0000000 --- a/etc/skel/.bash_profile +++ /dev/null @@ -1,4 +0,0 @@ -if [ -f ~/.bashrc ]; then - . ~/.bashrc -fi - diff --git a/etc/skel/.bashrc b/etc/skel/.bashrc deleted file mode 100644 index daf8ea5..0000000 --- a/etc/skel/.bashrc +++ /dev/null @@ -1,29 +0,0 @@ -PROMPT_COMMAND=__prompt_command - -__prompt_command() { - # Store current exit code - local EXIT="$?" - - # Define some colors - local RESET='\[\e[0m\]' - local RED='\[\e[0;31m\]' - local GREEN='\[\e[0;32m\]' - local BOLD_GRAY='\[\e[1;30m\]' - - # Start with an empty PS1 - PS1="" - - if [[ $EXIT -eq 0 ]]; then - # Add green if exit code 0 - PS1+="${GREEN}0${RESET} " - else - # Add red if exit code non 0 - PS1+="${RED}${EXIT}${RESET} " - fi - # These are the default prompts for root and user - if [ $(id -u) -eq 0 ]; then - PS1+="\u@\h:\w ($(ls | wc -l)) ${RESET}# " - else - PS1+="\u@\h:\w ($(ls | wc -l)) ${RESET}$ " - fi -} \ No newline at end of file diff --git a/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml b/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml deleted file mode 100644 index 444431e..0000000 --- a/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml b/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml deleted file mode 100644 index f3eaf08..0000000 --- a/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml b/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml deleted file mode 100644 index 2ad62ed..0000000 --- a/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/post-install.sh b/post-install.sh index c79eea2..737f49b 100755 --- a/post-install.sh +++ b/post-install.sh @@ -4,6 +4,8 @@ # To be executed before rebooting within a chroot. # +set -euo pipefail + # Desktop or server ? echo echo "Type desktop or server depending on what you want to do." @@ -17,17 +19,20 @@ read -p "> " bios_or_uefi ################################################################################ ### Bootloader -# BIOS -if [[ $bios_or_uefi = bios ]]; then - echo "Enter the disk id where you want the bootloader to be installed. (eg. sda)" - read -p "> " grub_disk - grub-install --modules=part_gpt /dev/$grub_disk -fi - -# UEFI -if [[ $bios_or_uefi = uefi ]]; then - grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi -fi +case "$bios_or_uefi" in + bios) + echo "Enter the disk id where you want the bootloader to be installed. (eg. sda)" + read -p "> " grub_disk + grub-install --modules=part_gpt "/dev/$grub_disk" + ;; + uefi) + grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi + ;; + *) + echo "Invalid choice." + exit 1 + ;; +esac # Generate grub menu grub-mkconfig -o /boot/grub/grub.cfg @@ -40,70 +45,56 @@ echo echo "Enter your UTF-8 locale or let empty for keeping default one. (eg. fr_FR)" read -p "> " utf8_locale if [[ -n $utf8_locale ]]; then - sed -i 's/export LANG=en_US.UTF-8/export LANG='$utf8_locale'.UTF-8/g' /etc/profile.d/lang.sh + # sed -i 's/export LANG=en_US.UTF-8/export LANG='$utf8_locale'.UTF-8/g' /etc/profile.d/lang.sh + sed -i "s/^export LANG=.*/export LANG=${utf8_locale}.UTF-8/" /etc/profile.d/lang.sh fi # Slackpkg mirror -sed -i '/# https:\/\/mirrors.slackware.com\/slackware\/slackware64-15.0\//s/^# //g' /etc/slackpkg/mirrors +sed -i '/# https:\/\/mirrors.slackware.com\/slackware\/slackware64-current\//s/^# //g' /etc/slackpkg/mirrors slackpkg update gpg -# Slackpkg blacklist -sed -i '/#\[0-9\]+_SBo/s/^#//g' /etc/slackpkg/blacklist -echo "e/" >> /etc/slackpkg/blacklist - -# Install Sbotools -cd /tmp -wget https://slackbuilds.org/slackbuilds/15.0/system/sbotools.tar.gz -tar -xvzf sbotools.tar.gz -cd sbotools -wget https://pghvlaans.github.io/sbotools/downloads/sbotools-3.8.1.tar.gz -./sbotools.SlackBuild -cd - # Use generic kernel # /usr/share/mkinitrd/mkinitrd_command_generator.sh -r | bash ### The old tool geninitrd grub-mkconfig -o /boot/grub/grub.cfg -# Copy bash config -cp etc/skel/.bash_profile /root -cp etc/skel/.bashrc /root -cp etc/skel/.bash_profile /etc/skel -cp etc/skel/.bashrc /etc/skel - ################################################################################ ### Usage specific configuration -# Desktop configuration -if [[ $desktop_or_server = desktop ]]; then - # Blacklist irrelevant groups - echo "kde/" >> /etc/slackpkg/blacklist - # X11 keymap - if [[ -n $utf8_locale ]]; then - echo - echo "Enter your keymap. (eg. fr-latin9)" - read -p "> " keymap - cp /usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf /etc/X11/xorg.conf.d/ - sed -i '0,/Option "XkbLayout" "us"/s//Option "XkbLayout" "'$keymap'"/' /etc/X11/xorg.conf.d/90-keyboard-layout-evdev.conf - fi - # Runlevel - sed -i 's/id:3:initdefault:/id:4:initdefault:/g' /etc/inittab - # Copy Slackware icon - cp usr/share/icons/Slackware.svg /usr/share/icons/ - # Copy XFCE config - cp -r etc/skel/.config /etc/skel - # XDM Slackware theme - sboinstall -r slackware-xdm-theme - # Additional softwares - sboinstall -r ristretto - sboinstall -r thunar-archive-plugin -fi - -# Server configuration -if [[ $desktop_or_server = server ]]; then - # Blacklist irrelevant groups - echo -e "kde/\nx/\nxap\nxfce/\ny/" >> /etc/slackpkg/blacklist -fi +case "$desktop_or_server" in + desktop) + # Blacklist irrelevant groups + grep -qxF "e/" /etc/slackpkg/blacklist || echo "e/" >> /etc/slackpkg/blacklist + grep -qxF "xfce/" /etc/slackpkg/blacklist || echo "xfce/" >> /etc/slackpkg/blacklist + # X11 keymap + # echo + # echo "Enter your keymap or let empty for keeping default one. (eg. fr)" + # read -p "> " keymap + # if [[ -n $keymap ]]; then + # mkdir -p /etc/X11/xorg.conf.d + # cp /usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf /etc/X11/xorg.conf.d/ + # # sed -i '0,/Option "XkbLayout" "us"/s//Option "XkbLayout" "'$keymap'"/' /etc/X11/xorg.conf.d/90-keyboard-layout-evdev.conf + # sed -i "0,/Option \"XkbLayout\" \"us\"/s//Option \"XkbLayout\" \"$keymap\"/" /etc/X11/xorg.conf.d/90-keyboard-layout-evdev.conf + # fi + # Runlevel + sed -i 's/id:3:initdefault:/id:4:initdefault:/g' /etc/inittab + ;; + server) + # Blacklist irrelevant groups + grep -qxF "e/" /etc/slackpkg/blacklist || echo "e/" >> /etc/slackpkg/blacklist + grep -qxF "kde/" /etc/slackpkg/blacklist || echo "kde/" >> /etc/slackpkg/blacklist + grep -qxF "t/" /etc/slackpkg/blacklist || echo "t/" >> /etc/slackpkg/blacklist + grep -qxF "tcl/" /etc/slackpkg/blacklist || echo "tcl/" >> /etc/slackpkg/blacklist + grep -qxF "x/" /etc/slackpkg/blacklist || echo "x/" >> /etc/slackpkg/blacklist + grep -qxF "xap/" /etc/slackpkg/blacklist || echo "xap/" >> /etc/slackpkg/blacklist + grep -qxF "xfce/" /etc/slackpkg/blacklist || echo "xfce/" >> /etc/slackpkg/blacklist + grep -qxF "y/" /etc/slackpkg/blacklist || echo "y/" >> /etc/slackpkg/blacklist + ;; + *) + echo "Invalid choice." + exit 1 + ;; +esac ################################################################################ ### User @@ -114,13 +105,6 @@ adduser ################################################################################ ### End -# Exit from chroot -exit - -# End message echo -echo ">>> Done !" -sleep 10 - -# Reboot -reboot +echo ">>> Configuration complete." +echo "Exit the chroot and reboot when ready." diff --git a/sbopkg/SHA256SUM b/sbopkg/SHA256SUM deleted file mode 100644 index 4223ee0..0000000 --- a/sbopkg/SHA256SUM +++ /dev/null @@ -1 +0,0 @@ -c302e306523b234bb025f1a74ee66d3037cfd25f2cc6ffd5f909e4d6278b5db6 sbopkg-0.38.2-noarch-1_wsr.tgz \ No newline at end of file diff --git a/sbopkg/sbopkg-0.38.2-noarch-1_wsr.tgz b/sbopkg/sbopkg-0.38.2-noarch-1_wsr.tgz deleted file mode 100644 index b71cf7a..0000000 Binary files a/sbopkg/sbopkg-0.38.2-noarch-1_wsr.tgz and /dev/null differ diff --git a/usr/share/icons/Slackware.svg b/usr/share/icons/Slackware.svg deleted file mode 100644 index 0323345..0000000 --- a/usr/share/icons/Slackware.svg +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - -