[scripts] move networkmanager setup to a function
This commit is contained in:
parent
9294a5d871
commit
191c257865
@ -79,6 +79,12 @@ setup_displaymanager() {
|
||||
fi
|
||||
}
|
||||
|
||||
setup_networkmanager() {
|
||||
rc-update del NetworkManager default
|
||||
rc-update del NetworkManager
|
||||
rc-update add NetworkManager default
|
||||
}
|
||||
|
||||
gforensic_remove_skel_stuff() {
|
||||
# remove desktop icons
|
||||
rm /etc/skel/Desktop/*
|
||||
@ -101,9 +107,7 @@ gforensic_remove_skel_stuff() {
|
||||
}
|
||||
|
||||
if [ "$1" = "lxde" ]; then
|
||||
rc-update del NetworkManager default
|
||||
rc-update del NetworkManager
|
||||
rc-update add NetworkManager default
|
||||
setup_networkmanager
|
||||
# Fix ~/.dmrc to have it load LXDE
|
||||
echo "[Desktop]" > /etc/skel/.dmrc
|
||||
echo "Session=LXDE" >> /etc/skel/.dmrc
|
||||
@ -129,9 +133,7 @@ elif [ "$1" = "e17" ]; then
|
||||
echo 'gtk-icon-theme-name="Tango" gtk-theme-name="Xfce"' | tr " " "\n" > /etc/skel/.gtkrc-2.0
|
||||
setup_cpufrequtils
|
||||
elif [ "$1" = "xfce" ]; then
|
||||
rc-update del NetworkManager default
|
||||
rc-update del NetworkManager
|
||||
rc-update add NetworkManager default
|
||||
setup_networkmanager
|
||||
# Fix ~/.dmrc to have it load XFCE
|
||||
echo "[Desktop]" > /etc/skel/.dmrc
|
||||
echo "Session=xfce" >> /etc/skel/.dmrc
|
||||
@ -139,9 +141,7 @@ elif [ "$1" = "xfce" ]; then
|
||||
setup_cpufrequtils
|
||||
setup_displaymanager
|
||||
elif [ "$1" = "fluxbox" ]; then
|
||||
rc-update del NetworkManager default
|
||||
rc-update del NetworkManager
|
||||
rc-update add NetworkManager default
|
||||
setup_networkmanager
|
||||
# Fix ~/.dmrc to have it load Fluxbox
|
||||
echo "[Desktop]" > /etc/skel/.dmrc
|
||||
echo "Session=fluxbox" >> /etc/skel/.dmrc
|
||||
@ -149,9 +149,7 @@ elif [ "$1" = "fluxbox" ]; then
|
||||
setup_displaymanager
|
||||
setup_cpufrequtils
|
||||
elif [ "$1" = "gnome" ]; then
|
||||
rc-update del NetworkManager default
|
||||
rc-update del NetworkManager
|
||||
rc-update add NetworkManager default
|
||||
setup_networkmanager
|
||||
# Fix ~/.dmrc to have it load GNOME
|
||||
echo "[Desktop]" > /etc/skel/.dmrc
|
||||
echo "Session=gnome" >> /etc/skel/.dmrc
|
||||
@ -161,9 +159,7 @@ elif [ "$1" = "gnome" ]; then
|
||||
setup_displaymanager
|
||||
setup_sabayon_mce
|
||||
elif [ "$1" = "gforensic" ]; then
|
||||
rc-update del NetworkManager default
|
||||
rc-update del NetworkManager
|
||||
rc-update add NetworkManager default
|
||||
setup_networkmanager
|
||||
# Fix ~/.dmrc to have it load GNOME
|
||||
echo "[Desktop]" > /etc/skel/.dmrc
|
||||
echo "Session=gnome" >> /etc/skel/.dmrc
|
||||
@ -174,9 +170,7 @@ elif [ "$1" = "gforensic" ]; then
|
||||
setup_sabayon_mce
|
||||
gforensic_remove_skel_stuff
|
||||
elif [ "$1" = "kde" ]; then
|
||||
rc-update del NetworkManager default
|
||||
rc-update del NetworkManager
|
||||
rc-update add NetworkManager default
|
||||
setup_networkmanager
|
||||
# Fix ~/.dmrc to have it load KDE
|
||||
echo "[Desktop]" > /etc/skel/.dmrc
|
||||
echo "Session=KDE-4" >> /etc/skel/.dmrc
|
||||
|
Loading…
Reference in New Issue
Block a user