diff --git a/ubuntu_livecd/mops-netz-stopper/initrd/nm/nmtelekinese.desktop b/Installer-USB-Stick/LiveCD/mops-netz-stopper/initrd/nm/nmtelekinese.desktop similarity index 100% rename from ubuntu_livecd/mops-netz-stopper/initrd/nm/nmtelekinese.desktop rename to Installer-USB-Stick/LiveCD/mops-netz-stopper/initrd/nm/nmtelekinese.desktop diff --git a/ubuntu_livecd/mops-netz-stopper/initrd/nm/nmtelekinese.py b/Installer-USB-Stick/LiveCD/mops-netz-stopper/initrd/nm/nmtelekinese.py similarity index 100% rename from ubuntu_livecd/mops-netz-stopper/initrd/nm/nmtelekinese.py rename to Installer-USB-Stick/LiveCD/mops-netz-stopper/initrd/nm/nmtelekinese.py diff --git a/ubuntu_livecd/mops-netz-stopper/initrd/scripts/casper-bottom/26mopsmops b/Installer-USB-Stick/LiveCD/mops-netz-stopper/initrd/scripts/casper-bottom/26mopsmops similarity index 100% rename from ubuntu_livecd/mops-netz-stopper/initrd/scripts/casper-bottom/26mopsmops rename to Installer-USB-Stick/LiveCD/mops-netz-stopper/initrd/scripts/casper-bottom/26mopsmops diff --git a/ubuntu_livecd/mops-netz-stopper/initrd/scripts/casper-bottom/ORDER b/Installer-USB-Stick/LiveCD/mops-netz-stopper/initrd/scripts/casper-bottom/ORDER similarity index 100% rename from ubuntu_livecd/mops-netz-stopper/initrd/scripts/casper-bottom/ORDER rename to Installer-USB-Stick/LiveCD/mops-netz-stopper/initrd/scripts/casper-bottom/ORDER diff --git a/ubuntu_livecd/mops-netz-stopper/upstart/nmtelekinese.conf b/Installer-USB-Stick/LiveCD/mops-netz-stopper/upstart/nmtelekinese.conf similarity index 100% rename from ubuntu_livecd/mops-netz-stopper/upstart/nmtelekinese.conf rename to Installer-USB-Stick/LiveCD/mops-netz-stopper/upstart/nmtelekinese.conf diff --git a/Installer-USB-Stick/customize-lip/clean_desktop_manifest b/Installer-USB-Stick/customize-lip/clean_desktop_manifest new file mode 100644 index 0000000000000000000000000000000000000000..7cfab5b05d620d8c6f386273d5d507975cef115f --- /dev/null +++ b/Installer-USB-Stick/customize-lip/clean_desktop_manifest @@ -0,0 +1 @@ +yes diff --git a/shellscripte/Lipuntu.sh b/Installer-USB-Stick/customize-lip/customize old mode 100644 new mode 100755 similarity index 53% rename from shellscripte/Lipuntu.sh rename to Installer-USB-Stick/customize-lip/customize index 581b4bb4788498c0fae6c044b0d78fe7fab6ae66..746dbb4eecadcba6b505b75d77702863af5d00e5 --- a/shellscripte/Lipuntu.sh +++ b/Installer-USB-Stick/customize-lip/customize @@ -1,6 +1,8 @@ #!/bin/bash -echo "# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ precise main restricted +function prepare_install() +{ + echo "# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ precise main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. @@ -56,20 +58,51 @@ deb http://extras.ubuntu.com/ubuntu precise main deb-src http://extras.ubuntu.com/ubuntu precise main " > /etc/apt/sources.list -echo "# offline repository of the linux install party + echo "# offline repository of the linux install party deb [ trusted=yes ] file:/isodevice/archives precise lip" > /etc/apt/sources.list.d/lipoffline.list -add-apt-repository ppa:texlive-backports/ppa + add-apt-repository -y ppa:texlive-backports/ppa -apt-get update -apt-get install aptitude -y + apt-get update +} -aptitude full-upgrade -y -aptitude install automake cmake aspell-de build-essential ffmpeg htop hunspell hunspell-de-de language-pack-de lvm2 mencoder screen tofrodos efibootmgr gdisk linux-headers vlc moreutils networkmanager-vpnc-gnome vim -aptitude install --without-recommends mdadm -aptitude install cm-super context feynmf fragmaster info latex-beamer latex-xcolor latexmk pgf psutils t1utils texinfo texlive-base texlive-bibtex-extra texlive-binaries texlive-common texlive-doc-base texlive-doc-de texlive-doc-en texlive-extra-utils texlive-font-utils texlive-fonts-extra texlive-fonts-extra-doc texlive-fonts-recommended texlive-fonts-recommended-doc texlive-formats-extra texlive-games texlive-generic-extra texlive-humanities texlive-humanities-doc texlive-lang-german texlive-latex-base texlive-latex-base-doc texlive-latex-extra texlive-latex-extra-doc texlive-latex-recommended texlive-latex-recommended-doc texlive-latex3 texlive-luatex texlive-math-extra texlive-metapost texlive-metapost-doc texlive-music texlive-omega texlive-pictures texlive-pictures-doc texlive-plain-extra texlive-pstricks texlive-pstricks-doc texlive-publishers texlive-publishers-doc texlive-science texlive-science-doc texlive-xetex +function install_packages() +{ + apt-get upgrade --assume-yes --force-yes + apt-get install aptitude -y -aptitude install wngerman wogerman wswiss poppler-data libreoffice-l10n-de libreoffice-help-de hyphen-de mythes-de thunderbird-locale-de + aptitude full-upgrade -y # make sure we have the newest versions + aptitude install automake cmake aspell-de build-essential ffmpeg htop hunspell lvm2 mencoder screen tofrodos efibootmgr gdisk linux-headers vlc moreutils networkmanager-vpnc-gnome vim -y # install general packages + aptitude install --without-recommends mdadm -y # install mdadm without mailserver + aptitude install cm-super context feynmf fragmaster info latex-beamer latex-xcolor latexmk pgf psutils t1utils texinfo texlive-base texlive-bibtex-extra texlive-binaries texlive-common texlive-doc-base texlive-doc-de texlive-doc-en texlive-extra-utils texlive-font-utils texlive-fonts-extra texlive-fonts-extra-doc texlive-fonts-recommended texlive-fonts-recommended-doc texlive-formats-extra texlive-games texlive-generic-extra texlive-humanities texlive-humanities-doc texlive-lang-german texlive-latex-base texlive-latex-base-doc texlive-latex-extra texlive-latex-extra-doc texlive-latex-recommended texlive-latex-recommended-doc texlive-latex3 texlive-luatex texlive-math-extra texlive-metapost texlive-metapost-doc texlive-music texlive-omega texlive-pictures texlive-pictures-doc texlive-plain-extra texlive-pstricks texlive-pstricks-doc texlive-publishers texlive-publishers-doc texlive-science texlive-science-doc texlive-xetex -y # install stripped version of texlive without all kinds of documentation in foreign languages -echo -n "Europe/Berlin" > /etc/timezone -rm -rf /var/crash/* + aptitude install hunspell-de-de language-pack-de language-pack-support-de wngerman wogerman wswiss poppler-data libreoffice-l10n-de libreoffice-help-de hyphen-de mythes-de thunderbird-locale-de firefox-locale-de -y # install german language support + + MISSING_LANG_PKG="$(check-language-support -l de_DE)" + MISSING_LANG_PKG="$(check-language-support -l en_US) $MISSING_LANG_PKG" # check for missing packages for de_DE and en_US + + if [ -n "$MISSING_LANG_PKG" ]; then + aptitude install $MISSING_LANG_PKG -y + fi + + EXTRA_LANG_PKG="$(dpkg-query --show | cut -f1 | grep -E '^(language-pack|language-support|firefox-locale|thunderbird-locale|libreoffice-help|libreoffice-l10n)' | grep -Ev "[-](de|en)\>")" # remove extra language packages + + if [ -n "$EXTRA_LANG_PKG" ]; then + aptitude purge $EXTRA_LANG_PKG -y + fi + +} + +function finalize() +{ + echo -n "Europe/Berlin" > /etc/timezone + + rm -rf /var/crash/* +} + +prepare_install +install_packages + +cp /tmp/customization-scripts/no-bootloader-icon/ubiquity-gtkui-no-bootloader.desktop /usr/share/applications/ + +finalize diff --git a/Installer-USB-Stick/customize-lip/customize_initrd b/Installer-USB-Stick/customize-lip/customize_initrd new file mode 100755 index 0000000000000000000000000000000000000000..05ea87590b8d830944556a824ec323d8783ee90a --- /dev/null +++ b/Installer-USB-Stick/customize-lip/customize_initrd @@ -0,0 +1,47 @@ +#!/bin/bash + +################################################################################### +# UCK - Ubuntu Customization Kit # +# Copyright (C) 2006-2010 UCK Team # +# # +# UCK is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# UCK is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with UCK. If not, see <http://www.gnu.org/licenses/>. # +################################################################################### + +REMASTER_HOME=$1 +REMASTER_DIR="$REMASTER_HOME/remaster-root" +INITRD_REMASTER_DIR="$REMASTER_HOME/remaster-initrd" + +echo "Using REMASTER_DIR=$REMASTER_DIR, INITRD_REMASTER_DIR=$INITRD_REMASTER_DIR" + +IRD="$INITRD_REMASTER_DIR" +SCRIPT_DIR="`dirname $0`" + +function install_nmtelekinese() +{ + mkdir -p "$IRD/nm" + cp "$SCRIPT_DIR/nmtelekinese/nmtelekinese.desktop" "$IRD/nm" + cp "$SCRIPT_DIR/nmtelekinese/nmtelekinese.py" "$IRD/nm" + cp "$SCRIPT_DIR/nmtelekinese/ORDER" "$IRD/scripts/casper-bottom/" + cp "$SCRIPT_DIR/nmtelekinese/26mopsmops" "$IRD/scripts/casper-bottom/" + chmod +x "$IRD/scripts/casper-bottom/26mopsmops" +} + +function add_no_bootloader_icon() +{ + cp "$SCRIPT_DIR/no-bootloader-icon/25adduser" "$IRD/scripts/casper-bottom/" + chmod +x "$IRD/scripts/casper-bottom/25adduser" +} + +install_nmtelekinese +add_no_bootloader_icon diff --git a/Installer-USB-Stick/customize-lip/customize_initrd~ b/Installer-USB-Stick/customize-lip/customize_initrd~ new file mode 100755 index 0000000000000000000000000000000000000000..9ac9874d6a64eed211cc6bed8de7679aec10c5dd --- /dev/null +++ b/Installer-USB-Stick/customize-lip/customize_initrd~ @@ -0,0 +1,44 @@ +#!/bin/bash + +################################################################################### +# UCK - Ubuntu Customization Kit # +# Copyright (C) 2006-2010 UCK Team # +# # +# UCK is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# UCK is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with UCK. If not, see <http://www.gnu.org/licenses/>. # +################################################################################### + +REMASTER_HOME=$1 +REMASTER_DIR="$REMASTER_HOME/remaster-root" +INITRD_REMASTER_DIR="$REMASTER_HOME/remaster-initrd" + +echo "Using REMASTER_DIR=$REMASTER_DIR, INITRD_REMASTER_DIR=$INITRD_REMASTER_DIR" + +IRD="$INITRD_REMASTER_DIR" +SCRIPT_DIR="`dirname $0`" + +function install_nmtelekinese() +{ + mkdir -p "$IRD/nm" + cp "$SCRIPT_DIR/nmtelekinese/nmtelekinese.*" "$IRD/nm" + cp "$SCRIPT_DIR/nmtelekinese/ORDER" "$IRD/scripts/casper-bottom/" + cp "$SCRIPT_DIR/nmtelekinese/26mopsmops" "$IRD/scripts/casper-bottom/" +} + +function add_no_bootloader_icon() +{ + cp "$SCRIPT_DIR/no-bootloader-icon/25adduser" "$IRD/scripts/casper-bottom/" +} + +install_nmtelekinese +add_no_bootloader_icon diff --git a/Installer-USB-Stick/customize-lip/customize_iso b/Installer-USB-Stick/customize-lip/customize_iso new file mode 100755 index 0000000000000000000000000000000000000000..a9bf588e2f88457fdf73ac7361ef1d596fb81453 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/customize_iso @@ -0,0 +1 @@ +#!/bin/bash diff --git a/Installer-USB-Stick/customize-lip/customize~ b/Installer-USB-Stick/customize-lip/customize~ new file mode 100755 index 0000000000000000000000000000000000000000..c3b56f0ca4c7fc626e934373b785ce61600ae6cb --- /dev/null +++ b/Installer-USB-Stick/customize-lip/customize~ @@ -0,0 +1,108 @@ +#!/bin/bash + +function prepare_install() +{ + echo "# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ precise main restricted + +# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to +# newer versions of the distribution. +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise main restricted +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise main restricted + +## Major bug fix updates produced after the final release of the +## distribution. +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-updates main restricted +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-updates main restricted + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team. Also, please note that software in universe WILL NOT receive any +## review or updates from the Ubuntu security team. +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise universe +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise universe +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-updates universe +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-updates universe + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team, and may not be under a free licence. Please satisfy yourself as to +## your rights to use the software. Also, please note that software in +## multiverse WILL NOT receive any review or updates from the Ubuntu +## security team. +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise multiverse +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise multiverse +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-updates multiverse +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-updates multiverse + +## N.B. software from this repository may not have been tested as +## extensively as that contained in the main release, although it includes +## newer versions of some applications which may provide useful features. +## Also, please note that software in backports WILL NOT receive any review +## or updates from the Ubuntu security team. + +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-security main restricted +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-security main restricted +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-security universe +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-security universe +deb http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-security multiverse +deb-src http://ftp.halifax.rwth-aachen.de/ubuntu/ precise-security multiverse + +## Uncomment the following two lines to add software from Canonical's +## 'partner' repository. +## This software is not part of Ubuntu, but is offered by Canonical and the +## respective vendors as a service to Ubuntu users. +# deb http://archive.canonical.com/ubuntu precise partner +# deb-src http://archive.canonical.com/ubuntu precise partner + +## This software is not part of Ubuntu, but is offered by third-party +## developers who want to ship their latest software. +deb http://extras.ubuntu.com/ubuntu precise main +deb-src http://extras.ubuntu.com/ubuntu precise main +" > /etc/apt/sources.list + + echo "# offline repository of the linux install party +deb [ trusted=yes ] file:/isodevice/archives precise lip" > /etc/apt/sources.list.d/lipoffline.list + + add-apt-repository -y ppa:texlive-backports/ppa + + apt-get update +} + +function install_packages() +{ + apt-get upgrade --assume-yes --force-yes + apt-get install aptitude -y + + aptitude full-upgrade -y # make sure we have the newest versions + aptitude install automake cmake aspell-de build-essential ffmpeg htop hunspell lvm2 mencoder screen tofrodos efibootmgr gdisk linux-headers vlc moreutils networkmanager-vpnc-gnome vim -y # install general packages + aptitude install --without-recommends mdadm -y # install mdadm without mailserver + aptitude install cm-super context feynmf fragmaster info latex-beamer latex-xcolor latexmk pgf psutils t1utils texinfo texlive-base texlive-bibtex-extra texlive-binaries texlive-common texlive-doc-base texlive-doc-de texlive-doc-en texlive-extra-utils texlive-font-utils texlive-fonts-extra texlive-fonts-extra-doc texlive-fonts-recommended texlive-fonts-recommended-doc texlive-formats-extra texlive-games texlive-generic-extra texlive-humanities texlive-humanities-doc texlive-lang-german texlive-latex-base texlive-latex-base-doc texlive-latex-extra texlive-latex-extra-doc texlive-latex-recommended texlive-latex-recommended-doc texlive-latex3 texlive-luatex texlive-math-extra texlive-metapost texlive-metapost-doc texlive-music texlive-omega texlive-pictures texlive-pictures-doc texlive-plain-extra texlive-pstricks texlive-pstricks-doc texlive-publishers texlive-publishers-doc texlive-science texlive-science-doc texlive-xetex -y # install stripped version of texlive without all kinds of documentation in foreign languages + + aptitude install hunspell-de-de language-pack-de language-pack-support-de wngerman wogerman wswiss poppler-data libreoffice-l10n-de libreoffice-help-de hyphen-de mythes-de thunderbird-locale-de firefox-locale-de -y # install german language support + + MISSING_LANG_PKG="$(check-language-support -l de_DE)" + MISSING_LANG_PKG="$(check-language-support -l en_US) $MISSING_LANG_PKG" # check for missing packages for de_DE and en_US + + if [ -n "$MISSING_LANG_PKG" ]; then + aptitude install "$MISSING_LANG_PKG" -y + fi + + EXTRA_LANG_PKG="$(dpkg-query --show | cut -f1 | grep -E '^(language-pack|language-support|firefox-locale|thunderbird-locale|libreoffice-help|libreoffice-l10n)' | grep -Ev "[-](de|en)\>")" # remove extra language packages + + if [ -n "$EXTRA_LANG_PKG" ]; then + aptitude purge "$MISSING_LANG_PKG" -y + fi + +} + +function finalize() +{ + echo -n "Europe/Berlin" > /etc/timezone + + rm -rf /var/crash/* +} + +prepare_install +install_packages + +cp /tmp/customization-scripts/no-bootloader-icon/ubiquity-gtkui-no-bootloader.desktop /usr/share/applications/ + +finalize diff --git a/Installer-USB-Stick/customize-lip/hybrid b/Installer-USB-Stick/customize-lip/hybrid new file mode 100644 index 0000000000000000000000000000000000000000..7cfab5b05d620d8c6f386273d5d507975cef115f --- /dev/null +++ b/Installer-USB-Stick/customize-lip/hybrid @@ -0,0 +1 @@ +yes diff --git a/Installer-USB-Stick/customize-lip/iso_description b/Installer-USB-Stick/customize-lip/iso_description new file mode 100644 index 0000000000000000000000000000000000000000..d902903f83add1baa98d4768884fd881c7314e27 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/iso_description @@ -0,0 +1 @@ +LIP SS2013 32BIT diff --git a/Installer-USB-Stick/customize-lip/keep_initrd_extraction b/Installer-USB-Stick/customize-lip/keep_initrd_extraction new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Installer-USB-Stick/customize-lip/language_packs b/Installer-USB-Stick/customize-lip/language_packs new file mode 100644 index 0000000000000000000000000000000000000000..996888bcd6d56f1a032f598d7ed3916d347f4fa5 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/language_packs @@ -0,0 +1,2 @@ +de +en diff --git a/Installer-USB-Stick/customize-lip/livecd_locale b/Installer-USB-Stick/customize-lip/livecd_locale new file mode 100644 index 0000000000000000000000000000000000000000..c574d073d1e394c90481ad201a5aad6a153c28e2 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/livecd_locale @@ -0,0 +1 @@ +en diff --git a/Installer-USB-Stick/customize-lip/livecd_locales b/Installer-USB-Stick/customize-lip/livecd_locales new file mode 100644 index 0000000000000000000000000000000000000000..996888bcd6d56f1a032f598d7ed3916d347f4fa5 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/livecd_locales @@ -0,0 +1,2 @@ +de +en diff --git a/Installer-USB-Stick/customize-lip/livecd_locales~ b/Installer-USB-Stick/customize-lip/livecd_locales~ new file mode 100644 index 0000000000000000000000000000000000000000..996888bcd6d56f1a032f598d7ed3916d347f4fa5 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/livecd_locales~ @@ -0,0 +1,2 @@ +de +en diff --git a/Installer-USB-Stick/customize-lip/nmtelekinese/26mopsmops b/Installer-USB-Stick/customize-lip/nmtelekinese/26mopsmops new file mode 100644 index 0000000000000000000000000000000000000000..2ddd5db4a61ad827a2d37f159465ddf1754b3d97 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/nmtelekinese/26mopsmops @@ -0,0 +1,41 @@ +#!/bin/sh + +PREREQ="" +DESCRIPTION="Enforcing MoPS disconnect" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +. /scripts/casper-functions +load_confmodule + +log_begin_msg "$DESCRIPTION" + +# Starting nmtelekinese with the MoPS network +cp /nm/nmtelekinese.py /root/usr/bin/ +chroot /root mkdir -m 755 -p /home/${USERNAME}/.config/autostart +cp /nm/nmtelekinese.desktop /root/home/${USERNAME}/.config/autostart +chroot /root chmod 755 /home/${USERNAME}/.config/autostart/nmtelekinese.desktop +chroot /root chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.config + +# Denying all connections to redirector.wlan.rwth-aachen.de +mount -t proc none /root/proc +chroot /root modprobe ip_tables +chroot /root modprobe iptable_filter +chroot /root modprobe ipt_REJECT +chroot /root iptables -I OUTPUT 1 -d 137.226.8.34 -j REJECT --reject-with icmp-host-prohibited +chroot /root iptables -I OUTPUT 1 -d 137.226.8.34 -p tcp -j REJECT --reject-with tcp-rst +umount /root/proc + +log_end_msg + diff --git a/Installer-USB-Stick/customize-lip/nmtelekinese/ORDER b/Installer-USB-Stick/customize-lip/nmtelekinese/ORDER new file mode 100644 index 0000000000000000000000000000000000000000..d58e948145edfcb1801400ab52388ebb3024c915 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/nmtelekinese/ORDER @@ -0,0 +1,78 @@ +/scripts/casper-bottom/01integrity_check +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/05mountpoints +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/05mountpoints_lupin +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/07remove_oem_config +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/10custom_installation +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/10ntfs_3g +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/12fstab +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/13swap +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/14locales +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/15autologin +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/18hostname +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/19keyboard +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/20xconfig +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/22gnome_panel_data +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/22screensaver +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/22serialtty +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/22sslcert +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/23etc_modules +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/23networking +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/24preseed +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/25adduser +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/25configure_init +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/26disable_user_menu +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/26mopsmops +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/30accessibility +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/31disable_update_notifier +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/32disable_hibernation +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/33enable_apport_crashes +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/34disable_kde_services +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/35fix_language_selector +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/36disable_trackerd +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/40install_driver_updates +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/41apt_cdrom +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/43disable_updateinitramfs +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/44pk_allow_ubuntu +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/45jackd2 +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/48kubuntu_disable_restart_notifications +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/49kubuntu_mobile_session +[ -e /conf/param.conf ] && . /conf/param.conf +/scripts/casper-bottom/50ubiquity-bluetooth-agent +[ -e /conf/param.conf ] && . /conf/param.conf diff --git a/Installer-USB-Stick/customize-lip/nmtelekinese/nmtelekinese.desktop b/Installer-USB-Stick/customize-lip/nmtelekinese/nmtelekinese.desktop new file mode 100644 index 0000000000000000000000000000000000000000..3f90e6fc778b25cd0a319f812927aeca5b9ee627 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/nmtelekinese/nmtelekinese.desktop @@ -0,0 +1,11 @@ + +[Desktop Entry] +Type=Application +Exec=/usr/bin/python /usr/bin/nmtelekinese.py 134.61.32.0/21 +Hidden=false +NoDisplay=false +X-GNOME-Autostart-enabled=true +Name[de_DE]=NM Telekinese +Name=NM Telekinese +Comment[de_DE]=Verdindert das Verbinden zu gefärlichen Netzwerken +Comment=Verdindert das Verbinden zu gefärlichen Netzwerken diff --git a/Installer-USB-Stick/customize-lip/nmtelekinese/nmtelekinese.py b/Installer-USB-Stick/customize-lip/nmtelekinese/nmtelekinese.py new file mode 100644 index 0000000000000000000000000000000000000000..acf413c53f7af75a78a625375feda3bfba195347 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/nmtelekinese/nmtelekinese.py @@ -0,0 +1,436 @@ +#! /usr/bin/python +# -*- coding: UTF-8 -*- +""" +Network Manager Telekinesis - Interdicts connections to unwanted networks + +This program controls NetworkManager via DBUS +in order to prevent it from connecting to certain networks. + +(Copyleft) 2012 Mmoebius/ALUG +License: GPLv3 http://www.gnu.org/licenses/gpl.html + +Version 1.0a - Fragt nicht nach dem Abschalten des Mops-Netz-Killers +""" + +### +### Configuration +### +#now: Cmdline Parameter +#IPv4unwanted = [ +# '134.61.32.0/21' # MoPS range +#] +IPv4unwantedRng=[] +DoDisableUnwanted=True # set to false to stop turning off the network + +### +### /Configuration +### + +SessionBusListener=None # gets set if waiting for the user to dismiss the action + +from pprint import pformat,pprint +import logging +logger = logging.getLogger(__name__) +logging.basicConfig(level=logging.INFO) + +import dbus, sys +from time import sleep + +# Need a Mainloop for signals +from dbus.mainloop.glib import DBusGMainLoop +import gobject +DBusGMainLoop(set_as_default=True) + +# Need struct for network byte order handling +from struct import pack,unpack + +#Parse comdline options +import argparse + +parser = argparse.ArgumentParser(description='Control NetworkManager to stay off some networks') +parser.add_argument('ipranges', metavar='IPv4range', type=str, nargs='+', + help='IPv4 range/mask to disconnect automatically. e.g. "10.11.12.0/24"') +parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', + help='Set debug level to DEBUG (default INFO)') + +parser.description="""Network Manager Telekinesis - Interdicts connections to unwanted networks""" +parser.epilog="""(Copyleft) 2012 Mmoebius/ALUG +License: GPLv3 http://www.gnu.org/licenses/gpl.html""" + +args = parser.parse_args() + +if args.verbose: + logger.level=logging.DEBUG + logger.debug('Verbose debug messages') + +IPv4unwanted=args.ipranges + +NMdevtype = { 1: "Ethernet", + 2: "Wi-Fi", + 5: "Bluetooth", + 6: "OLPC", + 7: "WiMAX", + 8: "Modem", + 9: "InfiniBand", + 10: "Bond", + 11: "VLAN", + 12: "ADSL" } + +NMstate = { 0: "Unknown", + 10: "Unmanaged", + 20: "Unavailable", + 30: "Disconnected", + 40: "Prepare", + 50: "Config", + 60: "Need Auth", + 70: "IP Config", + 80: "IP Check", + 90: "Secondaries", + 100: "Activated", + 110: "Deactivating", + 120: "Failed" } + +bus = dbus.SystemBus() + +# Get a proxy for the base NetworkManager object +proxy = bus.get_object("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager") +manager = dbus.Interface(proxy, "org.freedesktop.NetworkManager") + +def handle_Carrier(sender=None,**kwargs): + logger.debug("handle_Carrier from %s with %s",sender,pformat(kwargs)) + +def handle_PropertiesChanged(sender=None,**kwargs): + logger.debug("handle_PropertiesChanged from %s with %s",sender,pformat(kwargs)) + +def getProp(oPath,propIface,propName): + """Gets a 'org.freedesktop.DBus.Properties' from any interface on any object path 'org.freedesktop.NetworkManager' serves """ + proxy = bus.get_object("org.freedesktop.NetworkManager", oPath) + proxy_if = dbus.Interface(proxy, "org.freedesktop.DBus.Properties") + props = proxy_if.Get(propIface, propName) + return props + +def getAllProps(oPath,propIface): + """Gets all 'org.freedesktop.DBus.Properties' from any interface on any object path 'org.freedesktop.NetworkManager' serves """ + proxy = bus.get_object("org.freedesktop.NetworkManager", oPath) + proxy_if = dbus.Interface(proxy, "org.freedesktop.DBus.Properties") + props = proxy_if.GetAll(propIface) + return props + +#IP Address format conversions: +def IpDbus2Tuple(IpDbus): + return unpack('>BBBB',pack('>L',IpDbus)) #dbus order to tuple + +def IpDbus2Int(IpDbus): + return unpack('=L',pack('>L',IpDbus))[0] #dbus order to and'able int + +def IpInt2Tuple(IpInt): + return unpack('>BBBB',pack('=L',IpInt)) + +def IpStr2Tuple(IpStr): + return map(int,IpStr.split('.',3)) + +def IpTuple2String(IpTuple): + return ".".join(map(str,IpTuple[::-1])) + +def IpTuple2Int(IpTuple): + ipa=0 + for i in [0,1,2,3]: + ipa+=int(IpTuple[i])<<(24-8*i) + return ipa + +def IpMaskStr2StrA(IpMaskStr): + return IpMaskStr.rsplit('/',1) + +def IpStr2Tuple(IpStr): + tupl=map(int,IpStr.split('.',3)) + for i in tupl: + if (0>i) or (255<i): + raise ValueError("Ip address quad not in range 0..255: %d"%i) + return tupl + +def IpGetMasked(adr,mask): + # mask two IP addresses in 'int' - style. All host-specific bits cleared + return adr&(2**32-2**(32-mask)) #cutting at the right end + +def IpGetAntiMasked(adr,mask): + # return all nonmasked bits set '1'. All host-specific bits set + return adr|(2**(32-mask)-1) #cutting at the right end + +def handle_NotifyUserAction(replaces_id,ActionStrA): + global SessionBusListener + global DoDisableUnwanted + logger.debug('handle_NotifyUserAction: got %s %s',str(replaces_id),str(ActionStrA)) + if 'Mops-off-wantMops' in ActionStrA: + DoDisableUnwanted=False + logger.warn('User stops disabling networks.') + +def NotifyUser(): + global SessionBusListener + global DoDisableUnwanted + sbus = dbus.SessionBus() + oNotifier = sbus.get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications") + iNotifier=dbus.Interface(oNotifier, "org.freedesktop.Notifications") + + + if SessionBusListener is None: + SessionBusListener = sbus.add_signal_receiver(handle_NotifyUserAction, signal_name="ActionInvoked", + dbus_interface="org.freedesktop.Notifications" ) + logger.debug('Added Dbus listener for session bus: %s',str(SessionBusListener)) + + NotifyOptionsArray=[] +# Uncomment these 4 Lines if you want to be able to turn off disconnecting MoPS Networks +# if DoDisableUnwanted: +# NotifyOptionsArray=[ +# 'Mops-off-Ok', 'Ok', +# 'Mops-off-wantMops','MoPS nicht mehr trennen' +# ] + + sleep(3) # Wait until nm-dispatcher sends it smessage, do not overflood the NotifyOS, try not to get buried. + + iNotifier.Notify( + "nmtelekinesis", # Applicateion Identifier + 0, # replaces_id (hardcoded) + # Note: if replaces_id is 0, the return value is a UINT32 that represent the notification. + "network-error", # "notification-network-disconnected", + "Forced MoPS disconnect", + u"""Das MoPS Netzwerk ist während der Installation +unerwuenscht. Es wurde automatisch getrennt. + +Bitte aktiviere das Eduroam-Netzwerk gemäß +Anleitung mit 802.1X Authentifikation. + +Frage ein Installhelferhörnchen, +falls Du dabei Hilfe brauchst.""", + NotifyOptionsArray, + {}, #Application specific hint parameter + 30000 # OSD Notifier will not take long times + ) + +def WarnUser(): + sbus = dbus.SessionBus() + oNotifier = sbus.get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications") + iNotifier=dbus.Interface(oNotifier, "org.freedesktop.Notifications") + sleep(3) + iNotifier.Notify( + "nmtelekinesis", # Applicateion Identifier + 0, # replaces_id (hardcoded) + # Note: if replaces_id is 0, the return value is a UINT32 that represent the notification. + "network", # "notification-network-disconnected", + "MoPS discovered", + u"""Das MoPS Netzwerk ist während der Installation +unerwuenscht. Du bist gewarnt. + +Bitte aktiviere das Eduroam-Netzwerk gemäß +Anleitung mit 802.1X Authentifikation. + +Frage ein Installhelferhörnchen, +falls Du dabei Hilfe brauchst.""", + [], + {}, #Application specific hint parameter + 30000 # OSD Notifier will not take long times + ) + +def DisableAutoConnect(oConn): + """Disable AutoConnect for the currently active setting object in oConn""" + try: + Psetting=getProp(oConn,"org.freedesktop.NetworkManager.Connection.Active",'Connection') + proxy = bus.get_object("org.freedesktop.NetworkManager", Psetting) + proxy_if = dbus.Interface(proxy, "org.freedesktop.NetworkManager.Settings.Connection") + props = proxy_if.GetSettings() # read + logger.debug('DisableAutoConnect: Got settings %s',pformat(props)) + props['connection']['autoconnect']=0 # modify + proxy_if.Update(props) # write. Simple. + except Exception as err: + logger.warn('Error setting Autocconnect false for %s: (%s)',oConn,str(err)) + + +def DisconnectDevice(oPath, oConn): + global DoDisableUnwanted + if DoDisableUnwanted: + logger.debug('Disconnecting %s',str(oPath)) + proxy = bus.get_object("org.freedesktop.NetworkManager", oPath) + proxy_if = dbus.Interface(proxy, "org.freedesktop.NetworkManager.Device") + # about to disconnect something. + # See if there is a setting that can be set to "autoconnect=false" along with this + DisableAutoConnect(oConn) + #result = "Demo-NoDisconnect" + result = "failed" + result = proxy_if.Disconnect() + logger.info('Disconnected %s result %s',str(oPath),result) + NotifyUser() + else: + WarnUser() + logger.info('Not disconnecting %s (DoDisableUnwanted is false)',str(oPath)) + +def ScanIp4Config2(oIp4Config, oDevice, oConn): + try: + Pip4 = getProp(oIp4Config,"org.freedesktop.NetworkManager.IP4Config",'Addresses') + except dbus.exceptions.DBusException: + logger.debug("ScanIp4Config2(oDevice %s, oIp4Config %s, oConn %s): no IP4Config",oIp4Config, oDevice, oConn) + return + + CanDisconnect=False + for addr in Pip4: + logger.debug( + 'IP Address: %s/%d gw:%s', + IpTuple2String(IpDbus2Tuple(addr[0])), + addr[1], + IpTuple2String(IpDbus2Tuple(addr[2])) + ) + # check ip range against known unwanted range + ipa=IpDbus2Int(addr[0]) + if (0>ipa) or (2**32<ipa): + logger.warn('IPv4 address exceeds range: %d',ipa) + return + + for (iplo,iphi) in IPv4unwantedRng: + if (ipa>=iplo) and (ipa<=iphi): + logger.info('Detected ip in unwanted range: %s <= %s <= %s on %s', + IpTuple2String(IpInt2Tuple(iplo)), + IpTuple2String(IpInt2Tuple(ipa)), + IpTuple2String(IpInt2Tuple(iphi)), + str(oDevice) + ) + CanDisconnect=True + if CanDisconnect: + DisconnectDevice(oDevice, oConn) + return CanDisconnect + +def ScanActiveDevice2(adev,aconn): + logger.debug("Examining device: %s", str(adev)) + # IPv4Config may not be available instantly + pDev = getAllProps(adev,"org.freedesktop.NetworkManager.Device") + logger.debug('dev props %s',pDev) + if pDev.has_key('Ip4Config'): + oIPv4=pDev['Ip4Config'] + logger.debug('dev props ipv4config %s',oIPv4) + ScanIp4Config2(oIPv4,adev,aconn) + +def ScanActiveConnections2(ActiveConnections): + """Scans an array of connection objects for unwanted IP addresses""" + for aconn in ActiveConnections: + try: + logger.debug("Examining connection: %s", str(aconn)) + # read props from the Active Connection + Pconn = getProp(aconn,"org.freedesktop.NetworkManager.Connection.Active",'Devices') + Pmaster = getProp(aconn,"org.freedesktop.NetworkManager.Connection.Active",'Master') + if str(Pmaster) in map(str,ActiveConnections): + logger.debug("connection: %s has a master device %s that is examined elsewhere. Stop.", + str(aconn), + str(Pmaster) + ) + logger.debug("other location is %s in %s",sAconn,str(map(str,aconn))) + Pconn=[] + break + + for adev in Pconn: + ScanActiveDevice2(adev,aconn) + + except Exception as err: + logger.warn('Exception while examining connection %s: >>>%s<<<', + str(aconn), + str(err), + ) + +def handle_NmPropertiesChanged(sender=None,*args,**kwargs): + logger.debug("handle_NmPropertiesChanged with %s and %s and %s",str(sender),str(args),str(kwargs)) + logger.debug("handle_NmPropertiesChanged keys %s",str(sender.keys())) + # check if new connection active + if sender.has_key('ActiveConnections'): + conn=sender['ActiveConnections'] + logger.info("Scanning ActiveConnections: %s",str(conn)) + ScanActiveConnections2(conn) + if sender.has_key('Ip4Config'): + ipv4cfg=sender['Ip4Config'] + logger.info("Scanning Ip4Config: %s",str(ipv4cfg)) + ScanIp4Config2(ipv4cfg) + if sender.has_key('State'): + try: + StateHint=NMstate[sender['State']] + except KeyError: + StateHint='<unknown>' + logger.debug('State Change to >>>%s<<< (%s)',str(sender['State']),StateHint) + +def NmStateStr(iState): + try: + return NMstate[iState] + except KeyError: + return '<unknown>' + +def handle_NmDeviceStateChanged(sNew,sOld,sReason,**kwargs): + logger.debug("handle_NmDeviceStateChanged with %s",str(kwargs)) + logger.debug("handle_NmDeviceStateChanged %s (%d) -> %s (%d) Reason: %d", + NmStateStr(sOld), sOld, NmStateStr(sNew), sNew, sReason ) + if kwargs.has_key('oPath'): + oPath=kwargs['oPath'] + if 100 == sNew: + logger.info("Scanning Activated Device: %s",str(oPath)) + # need aconn so scan. + oAConn=getProp(oPath,'org.freedesktop.NetworkManager.Device','ActiveConnection') + ScanActiveDevice2(oPath,oAConn) + +#Device-Add is not yet required to be watch for +#def handle_addDevice(oDev,*args): +# logger.debug("handle_addDevice from %s with %s",str(oDev),str(args)) + +def ParseIPv4unwantedRng(IpStrList): + """filling IPv4unwantedRng from IPv4unwanted""" + global IPv4unwantedRng + for s in IpStrList: + try: + logger.debug('Unwanted IP: parsing >>>%s<<<',s) + [ips,masks]=IpMaskStr2StrA(s) + mask=int(masks) + ip=IpTuple2Int(IpStr2Tuple(ips)) + #logger.debug('Unwanted IP %s / %d',str(ip),mask) + if (0>mask) or (32<mask): + raise ValueError('Mask range 0..32 error') + if (0>ip) or (2**32<ip): + raise ValueError('ip range 0..2^32 error') + iplow=IpGetMasked(ip,mask) + iphigh=IpGetAntiMasked(ip,mask) + logger.info('Unwanted IP range %s - %s',IpTuple2String(IpInt2Tuple(iplow)),IpTuple2String(IpInt2Tuple(iphigh))) + IPv4unwantedRng.append((iplow,iphigh)) + except ValueError as err: + logger.warn('That is not a valid ip/mask: >>>%s<<< (%s)',str(s),err.message) + +logger.debug("Startup - preparing unwanted address ranges") +ParseIPv4unwantedRng(IPv4unwanted) + +if len(IPv4unwantedRng)<1: + logger.warn('No unwanted IP range given. Quit.') + quit(1) + +# Adding bus signal receivers +# See interface spec at http://projects.gnome.org/NetworkManager/developers/api/09/spec.html#org.freedesktop.NetworkManager +# Chapter "Signal" -> defines "DeviceAdded" on the interface "org.freedesktop.NetworkManager" + +#Device-Add is not yet required to be watch for +#bus.add_signal_receiver(handle_addDevice, signal_name="DeviceAdded", +# dbus_interface="org.freedesktop.NetworkManager" ) + +bus.add_signal_receiver(handle_NmPropertiesChanged, signal_name="PropertiesChanged", + dbus_interface="org.freedesktop.NetworkManager" ) + +# see path_keyword etc. in http://dbus.freedesktop.org/doc/dbus-python/api/dbus.service-module.html +bus.add_signal_receiver(handle_NmDeviceStateChanged, signal_name="StateChanged", + dbus_interface="org.freedesktop.NetworkManager.Device", + path_keyword='oPath') + +#Device-Add is not yet required to be watch for +## Adding all devices via the DeviceAdded callback +#Devices=manager.GetDevices() +#logger.debug("Startup - getting Devices: %s",str(Devices)) +#for oDev in Devices: +# handle_addDevice(oDev) + +ConnAct=getProp('/org/freedesktop/NetworkManager','org.freedesktop.NetworkManager','ActiveConnections') +logger.debug("Startup - getting active Connections: %s",str(ConnAct)) +# plug that into the active connection changed handler +ScanActiveConnections2(ConnAct) + +loop = gobject.MainLoop() +logger.debug("Entering MainLoop") +loop.run() # To stop, call loop.quit(). + +#end; diff --git a/Installer-USB-Stick/customize-lip/no-bootloader-icon/25adduser b/Installer-USB-Stick/customize-lip/no-bootloader-icon/25adduser new file mode 100755 index 0000000000000000000000000000000000000000..555cecffa2e79db48967f49e2681130269496827 --- /dev/null +++ b/Installer-USB-Stick/customize-lip/no-bootloader-icon/25adduser @@ -0,0 +1,124 @@ +#!/bin/sh + +PREREQ="" +DESCRIPTION="Adding live session user..." + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +. /scripts/casper-functions +load_confmodule + +log_begin_msg "$DESCRIPTION" + +debconf_backup () { + local question backup + for question; do + backup="$question-casper-backup" + db_register debian-installer/dummy "$backup" + db_get "$question" + db_set "$backup" "$RET" + db_fget "$question" seen + db_fset "$backup" seen "$RET" + done +} + +debconf_restore () { + local question backup + for question; do + backup="$question-casper-backup" + db_get "$backup" + db_set "$question" "$RET" + db_fget "$backup" seen + db_fset "$question" seen "$RET" + db_unregister "$backup" + done +} + +debconf_backup \ + passwd/root-password-crypted \ + passwd/root-password passwd/root-password-again \ + passwd/user-password-crypted \ + passwd/user-password passwd/user-password-again \ + passwd/user-fullname passwd/username passwd/user-uid + +# U6aMy0wojraho is just a blank password +db_set passwd/root-password-crypted '*' +db_set passwd/user-password-crypted U6aMy0wojraho +db_set passwd/user-fullname "$USERFULLNAME" +db_set passwd/username "$USERNAME" +db_set passwd/user-uid 999 + +chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null + +# Clear out debconf database again to avoid confusing ubiquity later. +debconf_restore \ + passwd/root-password-crypted \ + passwd/root-password passwd/root-password-again \ + passwd/user-password-crypted \ + passwd/user-password passwd/user-password-again \ + passwd/user-fullname passwd/username passwd/user-uid + +if [ -f /root/etc/sudoers ]; then + echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /root/etc/sudoers +fi + +# XXX - awful hack to stop xscreensaver locking the screen (#7150) +echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment + +LTS="$(cut -d' ' -f3 /root/cdrom/.disk/info 2>/dev/null)" || LTS= +RELEASE="$(cut -d' ' -f1-2 /root/cdrom/.disk/info 2>/dev/null)" || RELEASE= +if [ "$LTS" = "LTS" ] && [ -n "$RELEASE" ]; then + RELEASE="$RELEASE LTS" +fi +for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/ubiquity-gtkui-no-bootloader.desktop; do + if [ -f "/root/$file" ]; then + sed -i "s/RELEASE/$RELEASE/" "/root$file" + chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop + chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file") + fi +done + +if [ -L /root/home/$USERNAME/Examples ]; then + chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/ + mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/ +fi + +if [ -f /root/home/$USERNAME/examples.desktop ]; then + chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/ + mv /root/home/$USERNAME/examples.desktop /root/home/$USERNAME/Desktop/ +fi + +#Kubuntu +if [ -f "/root/usr/bin/plasma" ]; then + if [ -f "/root/usr/share/kde4/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop" ]; then + chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop + chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/kde4/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop /home/$USERNAME/Desktop/about-kubuntu.desktop + fi +fi + +#Ubuntu MID wants to be installed with --automatic +if [ -f "/root/usr/share/ubuntu-mid-default-settings/mid-gui-start" ]; then + if [ -f "/root/usr/share/applications/ubiquity-gtkui.desktop" ]; then + sed -i 's/--desktop/--automatic --desktop/' "/root/usr/share/applications/ubiquity-gtkui.desktop" + fi +fi + +#Ubuntu MID uses kourou, and the ubiquity icon should be easy to find +if [ -f "/root/usr/lib/hildon-desktop/kourou.py" ]; then + if [ -f "/root/etc/xdg/menus/home.menu" ]; then + sed -i '/<\/Include>/i\ <Filename>ubiquity-gtkui.desktop</Filename>' "/root/etc/xdg/menus/home.menu" + fi +fi + +log_end_msg diff --git a/shellscripte/ubiquity-gtkui-no-bootloader.desktop b/Installer-USB-Stick/customize-lip/no-bootloader-icon/ubiquity-gtkui-no-bootloader.desktop similarity index 100% rename from shellscripte/ubiquity-gtkui-no-bootloader.desktop rename to Installer-USB-Stick/customize-lip/no-bootloader-icon/ubiquity-gtkui-no-bootloader.desktop diff --git a/Installer-USB-Stick/customize-lip/remove_win32_files b/Installer-USB-Stick/customize-lip/remove_win32_files new file mode 100644 index 0000000000000000000000000000000000000000..7cfab5b05d620d8c6f386273d5d507975cef115f --- /dev/null +++ b/Installer-USB-Stick/customize-lip/remove_win32_files @@ -0,0 +1 @@ +yes diff --git a/Installer-USB-Stick/customize-lip/run_manual_customizations b/Installer-USB-Stick/customize-lip/run_manual_customizations new file mode 100644 index 0000000000000000000000000000000000000000..7ecb56eb3fa3fa6f19dd48bca9f971950b119ede --- /dev/null +++ b/Installer-USB-Stick/customize-lip/run_manual_customizations @@ -0,0 +1 @@ +no diff --git a/ubuntu_livecd/grub.cfg b/Installer-USB-Stick/grub.cfg similarity index 93% rename from ubuntu_livecd/grub.cfg rename to Installer-USB-Stick/grub.cfg index 944beea7a5cb7bace44412f22d95a31cf9594362..7c9b0fa9f8dde99d5aae40ff7600d57e8f8d3b7d 100644 --- a/ubuntu_livecd/grub.cfg +++ b/Installer-USB-Stick/grub.cfg @@ -1,5 +1,5 @@ -set iso32="lipws1213-i386.iso" -set iso64="lipws1213-amd64.iso" +set iso32="lipss13-i386.iso" +set iso64="lipss13-amd64.iso" function set64 { set iso=${iso64} @@ -54,7 +54,8 @@ function LoadCasperLoop { echo " Or you may need to run this:" echo " . /scripts/casper-helpers" echo " find_cow_device ${iso}" - linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/$iso file=/cdrom/preseed/ubuntu.seed ${localeinfo} nosplash verbose -- + linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/$iso file=/cdrom/preseed/ubuntu.seed +${localeinfo} nosplash verbose -- echo "Loading initrd from iso (takes up to 5 minutes)" initrd (loop)/casper/initrd.lz echo "Starting kernel" diff --git a/ubuntu_livecd/grub4dos/grub.cfg b/Installer-USB-Stick/grub4dos/grub.cfg similarity index 100% rename from ubuntu_livecd/grub4dos/grub.cfg rename to Installer-USB-Stick/grub4dos/grub.cfg diff --git a/ubuntu_livecd/grub4dos/grub24dos.zip b/Installer-USB-Stick/grub4dos/grub24dos.zip similarity index 100% rename from ubuntu_livecd/grub4dos/grub24dos.zip rename to Installer-USB-Stick/grub4dos/grub24dos.zip diff --git a/shellscripte/usbrepo/create_offline_repo.sh b/Installer-USB-Stick/usbrepo/create_offline_repo.sh similarity index 100% rename from shellscripte/usbrepo/create_offline_repo.sh rename to Installer-USB-Stick/usbrepo/create_offline_repo.sh diff --git a/shellscripte/usbrepo/infuse_offline_repo.sh b/Installer-USB-Stick/usbrepo/infuse_offline_repo.sh similarity index 100% rename from shellscripte/usbrepo/infuse_offline_repo.sh rename to Installer-USB-Stick/usbrepo/infuse_offline_repo.sh diff --git a/shellscripte/usbrepo/linuxparty.sh b/Installer-USB-Stick/usbrepo/linuxparty.sh similarity index 100% rename from shellscripte/usbrepo/linuxparty.sh rename to Installer-USB-Stick/usbrepo/linuxparty.sh diff --git a/shellscripte/usbrepo/mkdebarchive.sh b/Installer-USB-Stick/usbrepo/mkdebarchive.sh similarity index 100% rename from shellscripte/usbrepo/mkdebarchive.sh rename to Installer-USB-Stick/usbrepo/mkdebarchive.sh diff --git a/shellscripte/usbrepo/mount-stick-repo.sh b/Installer-USB-Stick/usbrepo/mount-stick-repo.sh similarity index 100% rename from shellscripte/usbrepo/mount-stick-repo.sh rename to Installer-USB-Stick/usbrepo/mount-stick-repo.sh diff --git a/shellscripte/adduser.patch b/shellscripte/adduser.patch deleted file mode 100644 index 32464fa59dab26d7d80aa2c901e2af57015d5341..0000000000000000000000000000000000000000 --- a/shellscripte/adduser.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- scripts/casper-bottom/25adduser.org -+++ scripts/casper-bottom/25adduser -@@ -81,12 +81,11 @@ - if [ "$LTS" = "LTS" ] && [ -n "$RELEASE" ]; then - RELEASE="$RELEASE LTS" - fi --for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde4/ubiquity-kdeui.desktop; do -+for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/ubiquity-gtkui-no-bootloader.desktop; do - if [ -f "/root/$file" ]; then - sed -i "s/RELEASE/$RELEASE/" "/root$file" - chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop - chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file") -- break - fi - done - diff --git a/shellscripte/create_shortcut.sh b/shellscripte/create_shortcut.sh deleted file mode 100644 index 0a909460f3441ba19765a148b24a640cdb457ea7..0000000000000000000000000000000000000000 --- a/shellscripte/create_shortcut.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -pushd /usr/share/applications/ -cp ubiquity-gtkui.desktop ubuquity-gtkui-no-bootloader.desktop -patch ubiquity-gtkui-no-bootloader.desktop /root/bootloader.patch -popd diff --git a/shellscripte/patch_initrd.sh b/shellscripte/patch_initrd.sh deleted file mode 100644 index 537da6ccc4708ac4ee18b9fcbe4a54daed687e69..0000000000000000000000000000000000000000 --- a/shellscripte/patch_initrd.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -mkdir initrd_edit -cd initrd_edit -echo "Extracting initrd..." -lzma -dc -S .lz ../initrd.lz | cpio -imvd --no-absolute-filenames -mv ../initrd.lz ../initrd.lz.org -echo "OK!" -echo "Patching..." -pwd -patch scripts/casper-bottom/25adduser ../adduser.patch -echo "OK!" -echo "Recompressing..." -find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz -echo "OK!" -cd .. -echo "Done" -exit 0