#!/bin/bash # xconf.sh : (2ème étape < suite de detect_conf.sh) # sera lancé en root function changeconf() { rm /home/phlinux/.config/openbox/autostart cp -a /home/phlinux/.config/openbox/autostart.$conf /home/phlinux/.config/openbox/autostart rm /etc/X11/xorg.conf cp /etc/X11/xorg.conf.$conf /etc/X11/xorg.conf rm /etc/network/interfaces cp /etc/network/interfaces.$conf /etc/network/interfaces } function reseau() { ifconfig -a echo "entrer le numéro eth*" read num ifup eth$num } echo "Changer la config en" select conf in "PHLINUX" "MAIRIE" "BASIQUE"; do if [ "$conf" = "PHLINUX" ]; then changeconf elif [ "$conf" = "MAIRIE" ]; then changeconf elif [ "$conf" = "BASIQUE" ]; then changeconf reseau fi break done exit