#!/bin/bash # # This script is licensed under GPL V3 or higher # # # Sources.list Hooks # First fix the sources list for generic lliurex flavours # Sanity operations mkdir -p /etc/apt/ echo "# Net-Installer generated sources.list" > /etc/apt/sources.list echo "deb http://mirror/llx1406 pandora main universe restricted multiverse partner" >> /etc/apt/sources.list IS_A_CLIENT="" IS_A_SERVER="" IS_A_MUSIC="" # Client rc=0 lliurex-version -t client || rc=1 if [ $rc -eq 0 ] ; then # Sanity operations mkdir -p /etc/apt/ # Now Write the sources.list echo "# LliureX Net-Installation Client" > /etc/apt/sources.list echo "deb http://mirror/llx1406 pandora main universe restricted multiverse partner" >> /etc/apt/sources.list IS_A_CLIENT="True" fi # Server rc=0 lliurex-version -t server || rc=1 if [ $rc -eq 0 ] ; then # Sanity operations mkdir -p /etc/apt/ # Now Write the sources.list echo "# LliureX Net-Installation Server" >> /etc/apt/sources.list echo "# Uncomment the next line to enable the local mirror" >> /etc/apt/sources.list echo "#deb file:///net/mirror/llx1406 pandora main universe restricted multiverse partner" >> /etc/apt/sources.list IS_A_SERVER="True" fi if [ -z "$IS_A_CLIENT" -a -z "$IS_A_SERVER" ]; then # Is a desktop machine echo "# LliureX Net-Installation Desktop" > /etc/apt/sources.list echo "deb http://lliurex.net/platinum pandora main universe restricted multiverse partner" >> /etc/apt/sources.list # Removing apt conf settings (proxy) : > /etc/apt/apt.conf || true fi # Fix the flash #rc2=0 #wget "http://server/plugins/libflashplayer.so" -O "/tmp/libflashplayer.so" || rc2=1 #if [ $rc2 -eq 0 ] ; then # mkdir -p /usr/lib/firefox-addons/plugins/ # [ -e /usr/lib/firefox-addons/plugins/libflashplayer.so ] || cp /tmp/libflashplayer.so /usr/lib/firefox-addons/plugins/ #fi # Fix the session: cp -f /usr/share/gnome-session/sessions/gnome-fallback.session /usr/share/gnome-session/sessions/ubuntu.session || true [ ! -f /usr/share/xsessions/ubuntu.desktop ] || rm -f /usr/share/xsessions/ubuntu.desktop [ ! -f /usr/share/xsessions/xterm.desktop ] || rm -f /usr/share/xsessions/xterm.desktop [ ! -f /usr/share/xsessions/ubuntu-2d.desktop ] || rm -f /usr/share/xsessions/ubuntu-2d.desktop [ ! -f /usr/share/gnome-session/sessions/ubuntu-2d.session ] || rm -f /usr/share/gnome-session/sessions/ubuntu-2d.session [ ! -f /usr/share/gnome-session/sessions/gnome.session ] || rm -f /usr/share/gnome-session/sessions/gnome.session [ ! -f /usr/share/gnome-session/sessions/ubuntu.session ] || rm -f /usr/share/gnome-session/sessions/ubuntu.session [ ! -f /var/lib/AccountsService/users/ubuntu ] || rm -f /var/lib/AccountsService/users/ubuntu # The mother of the lamb # Imported from lliurex-maker technology # Some values LIGHTDM_DM="/etc/lightdm/lightdm.conf" GNOME_DM="/etc/lightdm/gnome-fallback.conf" XFCE4_DM="/etc/lightdm/xfce.conf" if [ -f "$XFCE4_DM" ] ; then cat "$XFCE4_DM" > "$LIGHTDM_DM" elif [ -f "$GNOME_DM" ] ; then cat "$GNOME_DM" > "$LIGHTDM_DM" fi if [ "$1" = "--force" ] ; then # Do the reboot reboot fi exit 0