first commit
This commit is contained in:
88
README.md
Normal file
88
README.md
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
# Easy Slack !
|
||||||
|
|
||||||
|
Pour installer facilement une Slackware 15 fonctionnelle, pour une station de travail avec XFCE ou un serveur sans interface graphique.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Partitionner le/s disques
|
||||||
|
|
||||||
|
À faire...
|
||||||
|
|
||||||
|
### Installer le système
|
||||||
|
|
||||||
|
Un petit `# setup` pour lancer le script d'installation de Slackware.
|
||||||
|
|
||||||
|
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/`, `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.
|
||||||
|
|
||||||
|
> Attention à ne pas redémarrer, le système n'est pas encore bootable !
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Chroot
|
||||||
|
|
||||||
|
Avant de redémarrer entrer dans un shell, puis dans le système fraîchement installé à l'aide de `chroot` :
|
||||||
|
|
||||||
|
```
|
||||||
|
# chroot /mnt
|
||||||
|
```
|
||||||
|
|
||||||
|
### Script de post-installation
|
||||||
|
|
||||||
|
Télécharger et décompresser le script :
|
||||||
|
|
||||||
|
```
|
||||||
|
# cd tmp/
|
||||||
|
# wget https://git.netig.net/julien/easy-slack/archive/main.tar.gz
|
||||||
|
# tar -xvzf main.tar.gz
|
||||||
|
```
|
||||||
|
|
||||||
|
Puis l'exécuter :
|
||||||
|
|
||||||
|
```
|
||||||
|
# cd easy-slack/
|
||||||
|
# ./post-install.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
La machine redémarrera automatiquement une fois le script terminé.
|
||||||
|
|
||||||
|
## Utilisation
|
||||||
|
|
||||||
|
### Mise à jour
|
||||||
|
|
||||||
|
Pour mettre à jour le système avec `slackpkg` :
|
||||||
|
|
||||||
|
```
|
||||||
|
# slackpkg update
|
||||||
|
# slackpkg upgrade-all
|
||||||
|
```
|
||||||
|
|
||||||
|
Soyez vigilant aux paquets mis à jour avant de lancer la mise à jour, si le noyau en fait partie, il faudra avant de redémarrer la machine exécuter les deux commandes suivantes :
|
||||||
|
|
||||||
|
1. Régénérer les modules de noyau `generic`.
|
||||||
|
|
||||||
|
```
|
||||||
|
# /usr/share/mkinitrd/mkinitrd_command_generator.sh -r | bash
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Ainsi que les entrées du menu de démarrage de `grub`.
|
||||||
|
|
||||||
|
```
|
||||||
|
# grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
```
|
||||||
|
|
||||||
|
### SlackBuilds.org
|
||||||
|
|
||||||
|
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é.
|
||||||
|
|
||||||
|
Pour les installer facilement nous utiliserons `sbotools` (déjà installé si vous avez utilisé le script `post-install.sh`), une collection de scripts Perl pour utiliser [SlackBuilds.org](https://slackbuilds.org/) à la manière d'un système de ports BSD.
|
||||||
|
|
||||||
|
...
|
4
etc/skel/.bash_profile
Normal file
4
etc/skel/.bash_profile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
if [ -f ~/.bashrc ]; then
|
||||||
|
. ~/.bashrc
|
||||||
|
fi
|
||||||
|
|
29
etc/skel/.bashrc
Normal file
29
etc/skel/.bashrc
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
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
|
||||||
|
}
|
120
post-install.sh
Executable file
120
post-install.sh
Executable file
@@ -0,0 +1,120 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# To be executed before rebooting within a chroot.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Desktop or server ?
|
||||||
|
echo
|
||||||
|
echo "Type desktop or server depending on what you want to do."
|
||||||
|
read -p "> " desktop_or_server
|
||||||
|
|
||||||
|
# BIOS or UEFI ?
|
||||||
|
echo
|
||||||
|
echo "Type bios or uefi depending on the machine you have."
|
||||||
|
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
|
||||||
|
|
||||||
|
# Generate grub menu
|
||||||
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
# Set localization
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Slackpkg mirror
|
||||||
|
sed -i '/# https:\/\/mirrors.slackware.com\/slackware\/slackware64-15.0\//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
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Server configuration
|
||||||
|
if [[ $desktop_or_server = server ]]; then
|
||||||
|
# Blacklist irrelevant groups
|
||||||
|
echo -e "kde/\nx/\nxap\nxfce/\ny/" >> /etc/slackpkg/blacklist
|
||||||
|
fi
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
### User
|
||||||
|
|
||||||
|
# Add the first user
|
||||||
|
adduser
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
### End
|
||||||
|
|
||||||
|
# Exit from chroot
|
||||||
|
exit
|
||||||
|
|
||||||
|
# End message
|
||||||
|
echo
|
||||||
|
echo ">>> Done !"
|
||||||
|
sleep 10
|
||||||
|
|
||||||
|
# Reboot
|
||||||
|
reboot
|
1
sbopkg/SHA256SUM
Normal file
1
sbopkg/SHA256SUM
Normal file
@@ -0,0 +1 @@
|
|||||||
|
c302e306523b234bb025f1a74ee66d3037cfd25f2cc6ffd5f909e4d6278b5db6 sbopkg-0.38.2-noarch-1_wsr.tgz
|
BIN
sbopkg/sbopkg-0.38.2-noarch-1_wsr.tgz
Normal file
BIN
sbopkg/sbopkg-0.38.2-noarch-1_wsr.tgz
Normal file
Binary file not shown.
145
usr/share/icons/Slackware.svg
Normal file
145
usr/share/icons/Slackware.svg
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://web.resource.org/cc/"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="64px"
|
||||||
|
height="64px"
|
||||||
|
id="svg2160"
|
||||||
|
sodipodi:version="0.32"
|
||||||
|
inkscape:version="0.45"
|
||||||
|
sodipodi:docbase="/home/john/Desktop/slackwaresvg"
|
||||||
|
sodipodi:docname="slackware.svg"
|
||||||
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
|
sodipodi:modified="true">
|
||||||
|
<defs
|
||||||
|
id="defs2162">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient5027">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop5029" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop5031" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient3141">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:1;"
|
||||||
|
offset="0"
|
||||||
|
id="stop3143" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#000000;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop3145" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient3141"
|
||||||
|
id="linearGradient3147"
|
||||||
|
x1="2.363636"
|
||||||
|
y1="32.363636"
|
||||||
|
x2="61.454544"
|
||||||
|
y2="32.363636"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5027"
|
||||||
|
id="linearGradient5033"
|
||||||
|
x1="32"
|
||||||
|
y1="-29.818182"
|
||||||
|
x2="32.636364"
|
||||||
|
y2="33.272728"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient5027"
|
||||||
|
id="linearGradient12051"
|
||||||
|
gradientUnits="userSpaceOnUse"
|
||||||
|
x1="35.931786"
|
||||||
|
y1="-27.919043"
|
||||||
|
x2="35.546909"
|
||||||
|
y2="19.087839" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="11.313708"
|
||||||
|
inkscape:cx="34.941429"
|
||||||
|
inkscape:cy="38.781249"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:window-width="1270"
|
||||||
|
inkscape:window-height="930"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="24" />
|
||||||
|
<metadata
|
||||||
|
id="metadata2165">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer">
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="fill:#8389fc;fill-opacity:1;stroke:url(#linearGradient3147);stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path2168"
|
||||||
|
sodipodi:cx="31.90909"
|
||||||
|
sodipodi:cy="32.363636"
|
||||||
|
sodipodi:rx="29.545454"
|
||||||
|
sodipodi:ry="29.09091"
|
||||||
|
d="M 61.454544 32.363636 A 29.545454 29.09091 0 1 1 2.363636,32.363636 A 29.545454 29.09091 0 1 1 61.454544 32.363636 z"
|
||||||
|
transform="matrix(-8.7265346e-3,-0.9999618,0.9999618,-8.7265346e-3,-0.1748581,64.553932)" />
|
||||||
|
<path
|
||||||
|
style="font-size:64px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:0.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Courier 10 Pitch;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
d="M 18.658909,41.548364 C 18.658909,43.532362 19.49091,44.556364 20.962909,44.556364 C 21.666908,44.556364 22.69091,44.044363 24.162909,43.084364 C 27.682905,43.980364 30.818912,44.492364 33.634909,44.492364 C 41.442901,44.492364 45.858909,40.588359 45.858909,35.212364 C 45.858909,29.068371 41.570901,26.636364 33.314909,26.444364 C 27.170915,26.316365 23.586909,25.996361 23.586909,22.668364 C 23.586909,20.172367 25.954913,18.060364 30.114909,18.060364 C 33.378906,18.060364 35.682911,18.828367 38.050909,20.940364 C 39.906907,22.604363 40.54691,24.204364 41.954909,24.204364 C 43.490907,24.204364 44.066909,23.116362 44.066909,21.068364 L 44.066909,17.420364 C 44.066909,15.308367 43.362908,14.284364 41.954909,14.284364 C 40.290911,14.284364 39.650908,15.500364 38.754909,15.500364 C 37.85891,15.500364 35.362904,14.092364 30.818909,14.092364 C 23.074917,14.092364 18.786909,17.67637 18.786909,22.860364 C 18.786909,28.428359 23.330918,31.500364 31.842909,31.500364 C 32.738908,31.500364 33.314909,31.500364 33.634909,31.500364 C 38.370904,31.500364 40.674909,32.396368 40.674909,35.596364 C 40.674909,38.412362 37.858904,40.460364 33.314909,40.460364 C 29.090913,40.460364 25.506907,38.924362 23.842909,36.748364 C 22.62691,35.148366 22.818907,33.420364 20.898909,33.420364 C 19.234911,33.420364 18.658909,34.316366 18.658909,35.980364 L 18.658909,41.548364"
|
||||||
|
id="text5071" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.20000005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 15.052467,41.756279 L 14.948385,49.210097 L 49.95132,49.244272"
|
||||||
|
id="path5093" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.30000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 49.94457,50.251172 L 13.941099,50.248483 L 14.059778,41.749312 L 16.059582,41.777235 L 15.975809,47.776652 L 15.969463,48.231152 L 49.972496,48.251365 L 49.94457,50.251172 z "
|
||||||
|
id="path10031" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2">
|
||||||
|
<path
|
||||||
|
sodipodi:type="arc"
|
||||||
|
style="fill:url(#linearGradient12051);fill-opacity:1;stroke:none;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path5025"
|
||||||
|
sodipodi:cx="32.636364"
|
||||||
|
sodipodi:cy="5.6363635"
|
||||||
|
sodipodi:rx="36.636364"
|
||||||
|
sodipodi:ry="27.636364"
|
||||||
|
d="M 69.272728 5.6363635 A 36.636364 27.636364 0 1 1 -4,5.6363635 A 36.636364 27.636364 0 1 1 69.272728 5.6363635 z"
|
||||||
|
transform="matrix(0.6687345,0,0,0.7446098,10.11688,19.224801)" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.7 KiB |
Reference in New Issue
Block a user