[26117] in Source-Commits
/svn/athena r25398 - in trunk/debathena/debathena: . debathena-live debathena-live/debian debathena-live/image-src debathena-live/lib debathena-live/lib/bin debathena-live/sbin debathena-live/share debathena-live/share/casper-bottom debathena-live/share/oncd debathena-live/share/oncd/bin debathena-live/share/oncd/ubiquity debathena-live/share/oncd/ubiquity/lib debathena-live/share/oncd/u
daemon@ATHENA.MIT.EDU (John Jarvis)
Mon Sep 19 11:49:24 2011
Date: Mon, 19 Sep 2011 11:49:18 -0400
From: John Jarvis <jrjarvis@MIT.EDU>
Message-Id: <201109191549.p8JFnIZB022192@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jrjarvis
Date: 2011-09-19 11:49:18 -0400 (Mon, 19 Sep 2011)
New Revision: 25398
Added:
trunk/debathena/debathena/debathena-live/
trunk/debathena/debathena/debathena-live/TODO
trunk/debathena/debathena/debathena-live/debian/
trunk/debathena/debathena/debathena-live/debian/changelog
trunk/debathena/debathena/debathena-live/debian/compat
trunk/debathena/debathena/debathena-live/debian/control
trunk/debathena/debathena/debathena-live/debian/copyright
trunk/debathena/debathena/debathena-live/debian/debathena-livecd-tools.install
trunk/debathena/debathena/debathena-live/debian/rules
trunk/debathena/debathena/debathena-live/image-src/
trunk/debathena/debathena/debathena-live/image-src/splash1.xcf
trunk/debathena/debathena/debathena-live/image-src/splash2.xcf
trunk/debathena/debathena/debathena-live/lib/
trunk/debathena/debathena/debathena-live/lib/bin/
trunk/debathena/debathena/debathena-live/lib/bin/part2
trunk/debathena/debathena/debathena-live/lib/bin/policy-rc.d
trunk/debathena/debathena/debathena-live/sbin/
trunk/debathena/debathena/debathena-live/sbin/debathena-livecd-convert
trunk/debathena/debathena/debathena-live/share/
trunk/debathena/debathena/debathena-live/share/casper-bottom/
trunk/debathena/debathena/debathena-live/share/casper-bottom/10adduser
trunk/debathena/debathena/debathena-live/share/casper-bottom/18hostname
trunk/debathena/debathena/debathena-live/share/casper-bottom/44pk_allow_ubuntu
trunk/debathena/debathena/debathena-live/share/casper-bottom/50enable_drivers
trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_athinfo
trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_ubiquity
trunk/debathena/debathena/debathena-live/share/casper-bottom/50modify_greeter
trunk/debathena/debathena/debathena-live/share/casper-bottom/60conf_afs
trunk/debathena/debathena/debathena-live/share/oncd/
trunk/debathena/debathena/debathena-live/share/oncd/bin/
trunk/debathena/debathena/debathena-live/share/oncd/bin/netcheck
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/gtk_ui-mods.sed
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/plugins/
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/plugins/debathena.py
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/ubiquity/
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/ubiquity/components/
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/ubiquity/components/debathena_workstation_user_setup.py
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/debathena
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/gtk/
trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/gtk/stepDebathenaType.ui
trunk/debathena/debathena/debathena-live/share/splash/
trunk/debathena/debathena/debathena-live/share/splash/splash1.png
trunk/debathena/debathena/debathena-live/share/splash/splash2.png
Log:
livecd build environment - updated for Natty, ubiquity removed (#747)
Added: trunk/debathena/debathena/debathena-live/TODO
===================================================================
--- trunk/debathena/debathena/debathena-live/TODO (rev 0)
+++ trunk/debathena/debathena/debathena-live/TODO 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,23 @@
+# -workstation install still creates local user: debathena_workstation_user_setup doesn't get used
+
+# TODO:
+# custom-installation mechanism (see initramfs-tools(8) for how to copy things there) (don't clobber existing scripts, because that turns out to be a bad idea)
+# Checkboxes for -extra-software and -third-party.
+# Advanced installation options for -login
+# Put a version stamp in /var/log/debathena-livecd-version or something
+
+# Installing without internet?
+# Clicking on the restricted drivers thing multiple times
+
+# Mumble don't modify the resulting machine's initramfs-tools mumble
+? Going back on the debathena screen does the wrong thing
+# Enable propriatary drivers by default (System:Administation:Hardware Drivers)
+# do something like /mit/geofft/Public/start-network.py to get wirless
+# working pre-login
+
+# Zenity dialog not in front
+# focus issues when backtracking
+
+# Test the actual install process more
+# Manpage
+# Change font on splashscreen?
Added: trunk/debathena/debathena/debathena-live/debian/changelog
===================================================================
--- trunk/debathena/debathena/debathena-live/debian/changelog (rev 0)
+++ trunk/debathena/debathena/debathena-live/debian/changelog 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,99 @@
+debathena-livecd-tools (1~beta15) unstable; urgency=low
+
+ * Various updates for Natty compatibility
+ * Removed the install option by removing ubiquity
+
+ -- John Jarvis <jrjarvis@mit.edu> Tue, 13 Sep 2011 11:10:00 -0500
+
+debathena-livecd-tools (1~beta14) unstable; urgency=low
+
+ * Build Karmic Live CDs.
+
+ -- Xavid Pretzer <xavid@mit.edu> Wed, 13 Jan 2010 00:19:57 -0500
+
+debathena-livecd-tools (1~beta13) unstable; urgency=low
+
+ * Inhibit openafs-modules-dkms from being installed (for now).
+ * Remove the -nolzma flag to mksquashfs.
+
+ -- Xavid Pretzer <xavid@mit.edu> Mon, 30 Nov 2009 20:55:32 -0500
+
+debathena-livecd-tools (1~beta12) unstable; urgency=low
+
+ * Suggest that those installing debathena-standard may wish to use
+ their Athena username as their local username.
+
+ -- Xavid Pretzer <xavid@mit.edu> Mon, 28 Sep 2009 17:42:34 -0600
+
+debathena-livecd-tools (1~beta11) unstable; urgency=low
+
+ * Include debathena-network-manager-config to automatically configure
+ wireless.
+
+ -- Evan Broder <broder@mit.edu> Thu, 03 Sep 2009 15:54:09 -0400
+
+debathena-livecd-tools (1~beta10) unstable; urgency=low
+
+ * Include more Athena software and OpenOffice.org, and ditch
+ mono and non-en_us localizations.
+ * Install recommended software for installed packages.
+ * Uninstall the old kernel when upgrading the kernel.
+ * Add command-line arguments to support building a more-complete
+ Live DVD and to make CD customization easier.
+ * Add an live-cd-version athinfo query when booting from the CD.
+
+ -- Xavid Pretzer <xavid@mit.edu> Wed, 24 Jun 2009 14:45:50 -0600
+
+debathena-livecd-tools (1~beta9) unstable; urgency=low
+
+ * Compatibility with the new debathena-workstation, including
+ Sun Java.
+ * Fix an inexplicable bug where casper was still installed on the
+ target root.
+
+ -- Xavid Pretzer <xavid@mit.edu> Tue, 16 Jun 2009 17:24:09 -0600
+
+debathena-livecd-tools (1~beta8) unstable; urgency=low
+
+ * Don't schedule debathena-workstation to be installed on
+ debathena-standard installs.
+
+ -- Xavid Pretzer <xavid@mit.edu> Mon, 27 Apr 2009 18:13:48 -0600
+
+debathena-livecd-tools (1~beta7) unstable; urgency=low
+
+ * Compatibility with the Jaunty Live CD.
+ * Be more tolerant of network coming up slowly when "Install Debathena"
+ is selected from the boot menu.
+ * Don't fail if the kernel on the provided CD is already the most recent.
+ * Provide a clearer indication that you might want to log in as "ubuntu"
+ to get net up.
+
+ -- Xavid Pretzer <xavid@mit.edu> Sat, 25 Apr 2009 17:47:18 -0600
+
+debathena-livecd-tools (1~beta6) unstable; urgency=low
+
+ * Check whether you have internet before installing.
+ * Use debathena-login-graphical but install debathena-workstation.
+ * Minor ubiquity interface cleanup.
+
+ -- Xavid Pretzer <xavid@mit.edu> Sun, 12 Apr 2009 0:13:42 -0500
+
+debathena-livecd-tools (1~beta5) unstable; urgency=low
+
+ * Stop changing the Firefox default homepage.
+ * Only change the openafs conf when booting from the CD.
+
+ -- Xavid Pretzer <xavid@mit.edu> Sun, 8 Mar 2009 1:59:15 -0500
+
+debathena-livecd-tools (1~beta4) unstable; urgency=low
+
+ * Adaptation for Intrepid.
+
+ -- Xavid Pretzer <xavid@mit.edu> Wed, 25 Feb 2009 14:42:15 -0500
+
+debathena-livecd-tools (1~beta3~ubuntu8.04) unstable; urgency=low
+
+ * Initial debian packaging.
+
+ -- Xavid Pretzer <xavid@mit.edu> Tue, 18 Nov 2008 14:42:15 -0500
Added: trunk/debathena/debathena/debathena-live/debian/compat
===================================================================
--- trunk/debathena/debathena/debathena-live/debian/compat (rev 0)
+++ trunk/debathena/debathena/debathena-live/debian/compat 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1 @@
+5
Added: trunk/debathena/debathena/debathena-live/debian/control
===================================================================
--- trunk/debathena/debathena/debathena-live/debian/control (rev 0)
+++ trunk/debathena/debathena/debathena-live/debian/control 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,17 @@
+Source: debathena-livecd-tools
+Section: debathena/devel
+Priority: extra
+Standards-Version: 3.7.3
+Maintainer: Debathena Project <debathena@mit.edu>
+Build-Depends: cdbs, debhelper (>=5)
+
+Package: debathena-livecd-tools
+Depends: squashfs-tools, genisoimage, pv, syslinux, netpbm, rsync,
+ ${misc:Depends}, debathena-archive-keyring
+Architecture: all
+Description: Transmute Ubuntu live CDs into Debathena live CDs
+ Contains the debathena-livecd-convert script, which turns recent
+ Ubuntu Desktop live CDs into equivalent Debathena live CDs, and the
+ helper files it needs for this conversion. Works on Hardy and
+ Intrepid Live CDs.
+
Added: trunk/debathena/debathena/debathena-live/debian/copyright
===================================================================
--- trunk/debathena/debathena/debathena-live/debian/copyright (rev 0)
+++ trunk/debathena/debathena/debathena-live/debian/copyright 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,25 @@
+Author: Xavid Pretzer
+
+Copyright: 2008 Xavid Pretzer
+
+License:
+
+ This package 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 2 of the License, or
+ (at your option) any later version.
+
+ This package 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 this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+Files in /user/lib/debathena-livecd-tools/ubiquity/ have additional
+contributers as noted in the file headers.
Added: trunk/debathena/debathena/debathena-live/debian/debathena-livecd-tools.install
===================================================================
--- trunk/debathena/debathena/debathena-live/debian/debathena-livecd-tools.install (rev 0)
+++ trunk/debathena/debathena/debathena-live/debian/debathena-livecd-tools.install 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,3 @@
+sbin/* usr/sbin/
+lib/* usr/lib/debathena-livecd-tools/
+share/* usr/share/debathena-livecd-tools/
Added: trunk/debathena/debathena/debathena-live/debian/rules
===================================================================
--- trunk/debathena/debathena/debathena-live/debian/rules (rev 0)
+++ trunk/debathena/debathena/debathena-live/debian/rules 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
Property changes on: trunk/debathena/debathena/debathena-live/debian/rules
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/image-src/splash1.xcf
===================================================================
(Binary files differ)
Property changes on: trunk/debathena/debathena/debathena-live/image-src/splash1.xcf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/debathena/debathena/debathena-live/image-src/splash2.xcf
===================================================================
(Binary files differ)
Property changes on: trunk/debathena/debathena/debathena-live/image-src/splash2.xcf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/debathena/debathena/debathena-live/lib/bin/part2
===================================================================
--- trunk/debathena/debathena/debathena-live/lib/bin/part2 (rev 0)
+++ trunk/debathena/debathena/debathena-live/lib/bin/part2 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,138 @@
+#!/bin/bash -e
+
+# Part 2 of debathena-livecd-convert, run inside the chroot
+#bash
+
+function cleanup {
+ #bash
+ umount -l /proc
+ umount -l /sys
+ umount -l /lib/modules/*/volatile || :
+}
+trap cleanup EXIT SIGINT SIGTERM
+
+EXTRA_PACKAGES="$(cat /tmp/extra-packages)"
+EXTRA_NO_RECOMMENDS="$(cat /tmp/extra-no-recommends)"
+PURGE="$(cat /tmp/purge)"
+aptmods="$(cat /tmp/aptmods)"
+
+PURGE_MINUS=""
+for p in $PURGE ; do
+ PURGE_MINUS="$PURGE_MINUS ${p}~i_"
+done
+
+orig_vmlinuz=$(readlink /vmlinuz)
+
+# Mount special filesystems
+mount -t proc none /proc
+mount -t sysfs none /sys
+
+# Programs like these to be set
+export HOME=/root
+export LC_ALL=C
+
+# If Upstart is in use, add a dummy initctl to stop it starting jobs.
+if [ -x /sbin/initctl ]; then
+ mv /sbin/initctl /sbin/initctl.REAL
+ cat > /sbin/initctl <<EOF
+!/bin/sh
+echo 1>&2
+echo 'Warning: Fake initctl called, doing nothing.' 1>&2
+exit 0
+EOF
+ chmod a+rx /sbin/initctl
+fi
+
+# Mod sources.list
+echo "Modifying sources.list."
+sed -ri 's/^\#\s*(deb.+universe)$/\1/' /etc/apt/sources.list
+# Add updates
+if [[ $(lsb_release -sc) = 'hardy' ]] ; then
+ cat >> /etc/apt/sources.list <<EOF
+
+## Major bug fix updates produced after the final release of the
+## distribution.
+deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
+deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
+EOF
+fi
+# Add Debathena
+cat > /etc/apt/sources.list.d/debathena.list <<EOF
+# Debathena
+deb http://debathena.mit.edu/apt `lsb_release -sc` debathena debathena-config debathena-system openafs
+deb-src http://debathena.mit.edu/apt `lsb_release -sc` debathena debathena-config debathena-system openafs
+EOF
+
+# Get public key
+apt-key add /tmp/debathena-archive-keyring.gpg
+
+# Hack because polkit-auth doesn't work in the chroot
+dpkg-divert --divert /usr/bin/polkit-auth.real --rename /usr/bin/polkit-auth
+echo "#!/bin/sh" > /usr/bin/polkit-auth
+chmod a+rx /usr/bin/polkit-auth
+
+export DEBIAN_FRONTEND=noninteractive
+
+# Up{date,grade}
+echo "update, install aptitude..."
+apt-get update
+apt-get install -y aptitude
+
+# Install some stuff
+echo "Installing Debathena and removing unnecessary packages to free space..."
+#echo "sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean false" | debconf-set-selections
+aptitude install -Ry $EXTRA_NO_RECOMMENDS
+aptitude install -ry debathena-login-graphical \
+ debathena-standard \
+ openafs-modules-generic \
+ ubuntu-desktop \
+ linux-generic \
+ openafs-modules-dkms \
+ $EXTRA_PACKAGES \
+ $PURGE_MINUS
+
+if [ -n "$aptmods" ] ; then
+ aptitude install -ry "$aptmods"
+fi
+
+echo "Upgrading stuff..."
+aptitude -y full-upgrade
+
+# Remove old kernels if we upgraded
+kernel="$(readlink /vmlinuz | cut -d - -f 2-3)"
+aptitude purge -y '~nlinux-image-2!~nlinux-image-'"${kernel}~i" "~nlinux-headers~i"
+
+# Remove ubiquity
+aptitude purge -y ubiquity
+
+#bash
+
+# Set timezone
+rm /etc/localtime
+cp -f /usr/share/zoneinfo/America/New_York /etc/localtime
+echo "America/New_York" > /etc/timezone
+
+# Update the initramfs; this will have already happened if we installed
+# a new kernel
+if [[ "$orig_vmlinuz" = "$(readlink /vmlinuz)" ]] ; then
+ update-initramfs -u
+fi
+
+aptitude clean
+
+# restore initctl
+if [ -x /sbin/initctl.REAL ]; then
+ mv /sbin/initctl.REAL /sbin/initctl
+fi
+# Cache packages that we'd need to install debathena-workstation, but
+# don't actually install them
+# -xavid: punt this in favor of more installed software
+#echo "Downloading additional debathena-workstation packages..."
+#aptitude install -y --download-only debathena-workstation
+#aptitude keep-all
+
+rm /usr/bin/polkit-auth
+dpkg-divert --rename --remove /usr/bin/polkit-auth
+
+# From here, it exits the chroot and goes back to the debathena-livecd-convert script
+echo yay > /tmp/success
Property changes on: trunk/debathena/debathena/debathena-live/lib/bin/part2
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/lib/bin/policy-rc.d
===================================================================
--- trunk/debathena/debathena/debathena-live/lib/bin/policy-rc.d (rev 0)
+++ trunk/debathena/debathena/debathena-live/lib/bin/policy-rc.d 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,4 @@
+#!/bin/bash
+# Prevents init scripts from being run when installed in /usr/sbin
+# (thanks nelhage!)
+exit 101
Property changes on: trunk/debathena/debathena/debathena-live/lib/bin/policy-rc.d
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/sbin/debathena-livecd-convert
===================================================================
--- trunk/debathena/debathena/debathena-live/sbin/debathena-livecd-convert (rev 0)
+++ trunk/debathena/debathena/debathena-live/sbin/debathena-livecd-convert 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,292 @@
+#!/bin/bash -e
+
+# Turn an ubuntu Karmic Koala live cd into one for Debathena
+# See https://help.ubuntu.com/community/LiveCDCustomization
+# Running this script itself on a machine running the same
+# distro helps.
+
+function usage () {
+ echo "Usage: $0 [--dvd] [--aptitude '<package1> <package2>...'] [--tempdir /tmp/whatever] ubuntu-11.04-desktop-i386.iso debathena-i386.iso" > /dev/stderr
+ exit
+}
+
+args="$(getopt -o da:t:h --long dvd,aptitude:,tempdir:,help -n debathena-livecd-convert -- "$@")"
+
+eval set -- "$args"
+
+CD="CD"
+CDDESC=""
+aptmods=""
+
+while true ; do
+ case "$1" in
+ -d|--dvd) CD="DVD" ; shift ;;
+ -a|--aptitude) aptmods="$aptmods $2" ; CDDESC="Unofficial "; shift 2 ;;
+ -t|--tempdir) TMP="$2" ; dontrmtmp=1 ; shift 2 ;;
+ -h|--help) usage; shift ;;
+ --) shift ; break ;;
+ *) echo "Internal error!" ; exit 1 ;;
+ esac
+done
+
+if [[ $# -ne 2 ]] ; then
+ usage
+fi
+
+# Set vars
+if [[ -z "$TMP" ]] ; then
+ TMP=$(mktemp -dt debathena-livecd-XXXXXX)
+fi
+MNT="$TMP/mnt"
+EXCD="$TMP/extract-cd"
+EDIT="$TMP/edit"
+
+CDNAME="Debathena"
+
+if [ "$CD" = "DVD" ] ; then
+ echo "Using packages for Live DVD."
+ EXTRA_PACKAGES='
+ debathena-extra-software
+ bind9-host'
+ EXTRA_NO_RECOMMENDS='
+ debathena-network-manager-config'
+ PURGE=''
+else
+ EXTRA_PACKAGES='
+ bind9-host
+ emacs
+ vim-gnome
+ hesiod
+ krb5-clients
+ remctl-client
+ screen
+ rcs
+ cvs
+ subversion
+ git-core
+ tree'
+ EXTRA_NO_RECOMMENDS='
+ texlive-base
+ texlive-latex-base debathena-tex-config
+ texlive-latex-recommended texlive-latex-extra latex-beamer prosper
+ debathena-network-manager-config'
+ PURGE='
+ ^diveintopython$
+ ~nbogofilter
+ ~ngnome-games
+ ^ekiga$
+ ^tomboy$
+ ^f-spot$
+ ~n^mono-
+ ~n^libmono-
+ ~n^openoffice.org-help-
+ ~ngimp-help
+ en-gb$
+ en-au$
+ en-za$
+ ^wbritish$
+ ^python-uno$
+ gnome-user-guide
+ ^example-content$
+ ^language-pack-bn$ ^language-pack-bn-base$
+ ^language-pack-de$ ^language-pack-de-base$ ^language-pack-es$
+ ^language-pack-es-base$ ^language-pack-fr$ ^language-pack-fr-base$
+ ^language-pack-gnome-bn$ ^language-pack-gnome-bn-base$
+ ^language-pack-gnome-de$ ^language-pack-gnome-de-base$
+ ^language-pack-gnome-es$ ^language-pack-gnome-es-base$
+ ^language-pack-gnome-fr$ ^language-pack-gnome-fr-base$
+ ^language-pack-gnome-pt$ ^language-pack-gnome-pt-base$
+ ^language-pack-gnome-xh$ ^language-pack-gnome-xh-base$ ^language-pack-pt$
+ ^language-pack-pt-base$ ^language-pack-xh$ ^language-pack-xh-base$'
+fi
+
+# Having this mounted by accident is /very bad/ (you end up removing files
+# from the real /dev/), so double check.
+umount -l "$EDIT/dev" 2> /dev/null || :
+
+function cleanup {
+ echo "Cleaning up..."
+ umount -l "$EDIT/dev" || :
+ umount -dl "$MNT" || :
+ # These shouldn't be necessary (and shouldn't break a busy loop device),
+ # but seem to be for some reason.
+ # The -d switch to umount should be sufficient, but it's not
+ losetup -d /dev/loop7 || :
+ losetup -d /dev/loop6 || :
+ losetup -d /dev/loop5 || :
+ losetup -d /dev/loop4 || :
+ losetup -d /dev/loop3 || :
+ losetup -d /dev/loop2 || :
+ losetup -d /dev/loop1 || :
+ losetup -d /dev/loop0 || :
+
+ # Clean intermediate files
+ # If an explicit tempdir was given, don't remove it for debugging
+ if [[ -z "$dontrmtmp" ]] ; then
+ rm -Rf "$TMP"
+ else
+ echo "Not removing $TMP."
+ fi
+}
+trap cleanup EXIT SIGINT SIGTERM
+
+# Simple rsync equivalent that shows progress based on file count
+# Don't include switches that affect output or w/e
+# The -pte options to pv prevent it from printing the total number of
+# lines (i.e., files) and the number of lines/files per second, because
+# those look too much like byte counts.
+function rsync_p {
+ set -e
+ l=`rsync "$@" -n --out-format='%n' | wc -l`
+ rsync "$@" --out-format='%n' | pv -lpte -s $l > /dev/null
+}
+
+# Make sure we have necessary packages -- these are now dependencies
+#apt-get install squashfs-tools genisoimage pv syslinux netpbm
+
+# Make sure the module is loaded
+if ! grep -q squashfs /proc/filesystems ; then
+ echo "Filesystem 'squashfs' not found in /proc/filesystems." >/dev/stderr
+ echo "Try 'modprobe squashfs'?" > /dev/stderr
+ exit 1
+fi
+
+# Mount CD image
+echo "Mounting CD image."
+mkdir -p "$MNT"
+mount -o loop "$1" "$MNT"
+
+# Extract CD contents for modification
+echo "Extracting CD contents for modification."
+mkdir -p "$EXCD"
+rsync_p --exclude=/casper/filesystem.squashfs -a --delete "$MNT/" "$EXCD/"
+
+# Extract squashfs for mods
+echo "Unpack squashfs for modification."
+mkdir -p "$EDIT"
+unsquashfs -d "$EDIT" -f "$MNT/casper/filesystem.squashfs"
+
+# Modifying boot scripts
+echo "Modifying boot scripts..."
+rm -f "$EDIT/usr/share/initramfs-tools/scripts/casper-bottom/02timezone"
+rm -f "$EDIT/usr/share/initramfs-tools/scripts/casper-bottom/15autologin"
+cp "/usr/share/debathena-livecd-tools/casper-bottom/"*[!~] "$EDIT/usr/share/initramfs-tools/scripts/casper-bottom/"
+# for now, remove ubiquity mods since it won't be on the DVD
+rm -f "$EDIT/usr/share/initramfs-tools/scripts/casper-bottom/50mod_ubiquity"
+
+VERSION="$CDDESC$CD $(dpkg-query -W -f '${Version}\n' debathena-livecd-tools) $(date +%F)"
+sed -ri "s/VERSION=unknown/VERSION=\"$VERSION\"/" "$EDIT/usr/share/initramfs-tools/scripts/casper-bottom/50mod_athinfo"
+
+# Mod boot screen
+if [[ -e "$EXCD/isolinux/isolinux.txt" ]] ; then
+ menu="$EXCD/isolinux/isolinux.txt"
+else
+ menu="$EXCD/isolinux/txt.cfg"
+fi
+sed -ri "s/Ubuntu/$CDNAME/g" "$menu" "$EXCD/isolinux/isolinux.cfg"
+pngtopnm < "/usr/share/debathena-livecd-tools/splash/splash1.png" | ppmquant 256 | ppmtopcx > "$EXCD/isolinux/splash.pcx"
+# Force this one to no more than 16 colors
+pngtopnm < "/usr/share/debathena-livecd-tools/splash/splash2.png" | ppmquant 16 | ppmtolss16 "#000000=0" "#ffffff=7" > "$EXCD/isolinux/splash.rle"
+
+# Mod language
+echo 'en' > "$EXCD/isolinux/lang"
+
+# Mod README.diskdefines
+sed -ri 's/^(\#define DISKNAME\s+)(.+)$/\1'"$CDDESC$CDNAME"' \2/' "$EXCD/README.diskdefines"
+
+# Copy ubiquity mod files
+cp -a "/usr/share/debathena-livecd-tools/oncd" "$EDIT/oncd"
+# We need this for our aptitude
+# success_cmd to not fail horribly, because ubiquity
+# gets rid of its version too soon.
+cp "/usr/lib/debathena-livecd-tools/bin/policy-rc.d" "$EDIT/oncd/"
+
+# Prep chroot
+echo "Preparing for chroot..."
+# We'll need network
+cp /etc/resolv.conf "$EDIT/etc/"
+cp /etc/hosts "$EDIT/etc/"
+# Put a script named /usr/sbin/policy-rc.d that exits with code 101
+# This prevents init scripts from being run by installed software
+cp "/usr/lib/debathena-livecd-tools/bin/policy-rc.d" "$EDIT/usr/sbin/"
+
+# Debathena key
+cp "/usr/share/keyrings/debathena-archive-keyring.gpg" "$EDIT/tmp/"
+
+echo "$EXTRA_PACKAGES" > "$EDIT/tmp/extra-packages"
+echo "$EXTRA_NO_RECOMMENDS" > "$EDIT/tmp/extra-no-recommends"
+echo "$PURGE" > "$EDIT/tmp/purge"
+echo "$aptmods" > "$EDIT/tmp/aptmods"
+
+mount --rbind /dev "$EDIT/dev"
+
+# stop cups since if it is running the
+# the install will try to add printers
+if [ $(pidof cupsd) ]; then
+ service cups stop
+ restart_cups=true
+fi
+
+# Set up the chroot script
+cp "/usr/lib/debathena-livecd-tools/bin/part2" "$EDIT/tmp/"
+
+# Chroot
+echo "Chroot!"
+unset SUDO_USER
+unset SUDO_UID
+unset SUDO_GID
+chroot "$EDIT" /tmp/part2
+echo "End Chroot."
+
+if [ ! -e "$EDIT/tmp/success" ] ; then
+ echo "Chroot part2 failed." > /dev/stderr
+ exit 1
+fi
+
+if [ $restart_cups ]; then
+ service cups restart
+fi
+
+
+
+# Back from the chroot
+
+# Keep regenerated boot image
+cp "$EDIT/initrd.img" "$EXCD/casper/initrd.gz"
+# Karmic uses initrd.lz
+gzip -dc "$EXCD/casper/initrd.gz" | lzma -7 > "$EXCD/casper/initrd.lz"
+# And use the upgraded kernel, if we did an upgrade
+if [[ -e "$(readlink -f "$EDIT/vmlinuz")" ]] ; then
+ echo "Using kernel $(readlink -f "$EDIT/vmlinuz")."
+ mv "$(readlink -f "$EDIT/vmlinuz")" "$EXCD/casper/vmlinuz"
+fi
+
+# Clean up
+rm -Rf "$EDIT/tmp/"* # This includes part2
+rm "$EDIT/etc/resolv.conf"
+rm "$EDIT/etc/hosts"
+rm "$EDIT/usr/sbin/policy-rc.d"
+
+# Regenerate manifest
+echo "Generating manifest."
+chroot "$EDIT" dpkg-query -W --showformat='${Package} ${Version}\n' > "$EXCD/casper/filesystem.manifest"
+cp "$EXCD/casper/filesystem.manifest" "$EXCD/casper/filesystem.manifest-desktop"
+sed -i '/ubiquity/d' "$EXCD/casper/filesystem.manifest-desktop"
+
+# Compress filesystem
+echo "Compressing filesystem."
+rm -f "$EXCD/casper/filesystem.squashfs"
+# Needed -nolzma pre-Karmic
+mksquashfs "$EDIT" "$EXCD/casper/filesystem.squashfs"
+
+# Calc md5sums
+echo "Calcualting checksums."
+rm "$EXCD/md5sum.txt"
+(cd "$EXCD" && find . -type f -print0 | xargs -0 md5sum > md5sum.txt)
+
+# Create ISO
+echo "Building ISO."
+genisoimage -r -V "$CDNAME Live" -cache-inodes -J -l -b "isolinux/isolinux.bin" -c "isolinux/boot.cat" -no-emul-boot -boot-load-size 4 -boot-info-table -o "$2" "$EXCD"
+
+# Now test it with VMware or something
+echo "Done!"
Property changes on: trunk/debathena/debathena/debathena-live/sbin/debathena-livecd-convert
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/casper-bottom/10adduser
===================================================================
--- trunk/debathena/debathena/debathena-live/share/casper-bottom/10adduser (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/casper-bottom/10adduser 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+PREREQ=""
+DESCRIPTION="Adding local live session user..."
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF
+set passwd/root-password-crypted *
+set passwd/user-password-crypted
+set passwd/user-fullname $USERFULLNAME
+set passwd/username $USERNAME
+set passwd/user-uid 999
+EOF
+
+chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null
+
+# Clear out debconf database again to avoid confusing ubiquity later.
+chroot /root debconf-communicate -fnoninteractive casper > /dev/null <<EOF
+set passwd/root-password-crypted
+set passwd/user-password-crypted
+set passwd/user-fullname
+set passwd/username
+set passwd/user-uid
+EOF
+
+# +debathena
+
+if [ -f /root/etc/sudoers ]; then
+ # All users can SUDO
+ echo 'ALL ALL=(ALL) NOPASSWD: ALL' > /root/etc/sudoers
+fi
+
+if [ -f /root/etc/security/access.conf ]; then
+ # Don't let anyone ssh in
+ cat > /root/etc/security/access.conf <<EOF
+# While booting from the Live CD, don't allow anyone to SSH in
+- : ALL : ALL EXCEPT LOCAL
+EOF
+fi
+
+# Also disable sshd, for good measure
+rm -f /root/etc/rc?.d/S??ssh
+
+# Ubuntu doesn't even prompt for a password
+chroot /root sed -ri 's/^(.*pam_unix.so)/auth\tsufficient\tpam_succeed_if.so user = ubuntu\n\1/' '/etc/pam.d/common-auth'
+
+#/debathena
+
+# XXX - awful hack to stop xscreensaver locking the screen (#7150)
+echo 'RUNNING_UNDER_GDM="yes"' >> /root/etc/environment
+
+for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop; do
+ if [ -f "/root/$file" ]; then
+ 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
+
+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
+
+#Kubuntu (KDE 3)
+if [ -f "/root/usr/bin/konqueror" ]; then
+ if [ -f "/root/usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved" ]; then
+ chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop
+ chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved /home/$USERNAME/Desktop/about-kubuntu.desktop
+ fi
+fi
+#Kubuntu (KDE 4)
+if [ -f "/root/usr/lib/kde4/bin/plasma" ]; then
+ if [ -f "/root/usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved" ]; then
+ chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop
+ chroot /root ln -s /usr/share/doc/kde/HTML/en/kubuntu/about-kubuntu/index.html "/home/$USERNAME/Desktop/About Kubuntu"
+ chroot /root chown $USERNAME.$USERNAME "/home/$USERNAME/Desktop/About Kubuntu"
+ fi
+fi
+
+log_end_msg
Property changes on: trunk/debathena/debathena/debathena-live/share/casper-bottom/10adduser
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/casper-bottom/18hostname
===================================================================
--- trunk/debathena/debathena/debathena-live/share/casper-bottom/18hostname (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/casper-bottom/18hostname 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,40 @@
+#! /bin/sh
+
+PREREQ=""
+HOST="debathena-live"
+DESCRIPTION="Setting hostname to $HOST..."
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+echo "$HOST" > /root/etc/hostname
+cat > /root/etc/hosts <<EOF
+127.0.0.1 localhost
+127.0.1.1 $HOST
+
+# The following lines are desirable for IPv6 capable hosts
+::1 ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
+ff02::3 ip6-allhosts
+
+EOF
+hostname "$HOST"
+
+log_end_msg
Property changes on: trunk/debathena/debathena/debathena-live/share/casper-bottom/18hostname
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/casper-bottom/44pk_allow_ubuntu
===================================================================
--- trunk/debathena/debathena/debathena-live/share/casper-bottom/44pk_allow_ubuntu (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/casper-bottom/44pk_allow_ubuntu 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+PREREQ=""
+DESCRIPTION="Grant administrative PolicyKit pivilieges to livecd users..."
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+# configure PolicyKit in live session
+cat << EOF > /root/etc/PolicyKit/PolicyKit.conf
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->
+
+<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
+"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">
+
+<!-- See the manual page PolicyKit.conf(5) for file format -->
+
+<config version="0.1">
+ <!-- don't ask password for user in live session -->
+ <return result="yes"/>
+</config>
+EOF
+
+log_end_msg
Property changes on: trunk/debathena/debathena/debathena-live/share/casper-bottom/44pk_allow_ubuntu
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/casper-bottom/50enable_drivers
===================================================================
--- trunk/debathena/debathena/debathena-live/share/casper-bottom/50enable_drivers (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/casper-bottom/50enable_drivers 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+PREREQ=""
+DESCRIPTION="Setting things up to enable restricted drivers..."
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+cat > /root/etc/init.d/enable-drivers <<EOF
+#!/bin/bash
+for d in \$(jockey-gtk -l | cut -d ' ' -f 1) ; do
+ jockey-gtk -e "\$d"
+done
+EOF
+ln -s /etc/init.d/enable-drivers /root/etc/rcS.d/S80enable-drivers
+
+log_end_msg
Property changes on: trunk/debathena/debathena/debathena-live/share/casper-bottom/50enable_drivers
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_athinfo
===================================================================
--- trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_athinfo (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_athinfo 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+PREREQ=""
+DESCRIPTION="Adding live-cd-version athinfo query..."
+
+VERSION=unknown
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+echo "live-cd-version echo $VERSION" >> /etc/athena/athinfo.defs
+
+log_end_msg
Property changes on: trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_athinfo
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_ubiquity
===================================================================
--- trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_ubiquity (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_ubiquity 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+PREREQ=""
+DESCRIPTION="Modifying greeter for Debathena install..."
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+# Put static ubiquity files in to place
+cp -a "/root/oncd/ubiquity/lib/"* "/root/usr/lib/ubiquity/"
+cp -a "/root/oncd/ubiquity/share/"* "/root/usr/share/ubiquity/"
+# We need this for our aptitude
+# success_cmd to not fail horribly, because ubiquity
+# gets rid of its version too soon.
+cp "/root/oncd/policy-rc.d" "/root/usr/share/ubiquity/"
+
+# Also, for some reason success commands aren't always run as root, so do
+# this hack
+sed -ri "s/^(\s+subprocess\.call\(\[)('sh', *'-c')/\1'sudo', \2/g" "/root/usr/lib/ubiquity/ubiquity/frontend/base.py"
+
+# And do the gtk_ui.py mods
+sed -ri -f "/root/oncd/ubiquity/gtk_ui-mods.sed" "/root/usr/lib/ubiquity/ubiquity/frontend/gtk_ui.py"
+
+# And check internet before installing
+sed -ri 's!(def main\(\):)!\1\n if os.system("""text=$(/oncd/bin/netcheck) || (zenity --error --text "$text"; exit 1)""") >> 8: sys.exit(1)!' "/root/usr/bin/ubiquity"
+
+log_end_msg
Property changes on: trunk/debathena/debathena/debathena-live/share/casper-bottom/50mod_ubiquity
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/casper-bottom/50modify_greeter
===================================================================
--- trunk/debathena/debathena/debathena-live/share/casper-bottom/50modify_greeter (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/casper-bottom/50modify_greeter 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+PREREQ=""
+DESCRIPTION="Putting help message on the greeter screen..."
+
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+. /scripts/casper-functions
+
+log_begin_msg "$DESCRIPTION"
+
+chroot /root gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /apps/gdm/simple-greeter/banner_message_enable "true"
+chroot /root gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set /apps/gdm/simple-greeter/banner_message_text 'You can log in as "ubuntu" or (if you have internet) your Athena user. Log in as "ubuntu" to install or to configure internet.'
+
+log_end_msg
Property changes on: trunk/debathena/debathena/debathena-live/share/casper-bottom/50modify_greeter
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/casper-bottom/60conf_afs
===================================================================
--- trunk/debathena/debathena/debathena-live/share/casper-bottom/60conf_afs (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/casper-bottom/60conf_afs 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+PREREQ=""
+DESCRIPTION="Configuring OpenAFS for Live CD boot..."
+
+. /scripts/casper-functions
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+log_begin_msg "$DESCRIPTION"
+
+# Mod openafs to use memcache
+cat >>/root/etc/openafs/afs.conf <<EOF
+# If our filesystem's not ext2/ext3, use memcache
+if [ "\`stat -f -c %t /var/cache/openafs\`" != ef53 ] ; then
+ OPTIONS="\$OPTIONS -memcache"
+fi
+EOF
+# And make it not so big
+sed -ri 's/^\/afs\:([^:]+)\:.*$/\/afs:\1:25000/' /root/etc/openafs/cacheinfo
+
+log_end_msg
Property changes on: trunk/debathena/debathena/debathena-live/share/casper-bottom/60conf_afs
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/oncd/bin/netcheck
===================================================================
--- trunk/debathena/debathena/debathena-live/share/oncd/bin/netcheck (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/oncd/bin/netcheck 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+function res {
+ #logger -t netcheck "$1"
+ echo "$1"
+}
+
+# Try multiple times, since we might be doing this right after boot, when
+# stuff's not upish yet
+for (( t=0 ; t < 3 ; t = t + 1 )) ; do
+ dip=$(host -t A debathena.mit.edu)
+ res=$?
+ if [[ $res == 0 ]] ; then
+ break
+ fi
+done
+if [[ $res != 0 ]] ; then
+ res "You seem not to have Internet. Connect your computer to an Ethernet cable or configure your wireless, then try again."
+ exit 2
+fi
+
+dip=$(echo "$dip" | tail -n 1 | awk '{print $4}')
+
+if [[ "$dip" = "10.72.0.47" ]] ; then
+ res "You seem to be on MITNET but not have registered this computer. Try opening Firefox and visiting any website to register, then try again."
+ exit 3
+elif [[ "$(echo $dip | cut -d . -f 1)" = "18" ]] ; then
+ #logger -t netcheck "Netcheck success!"
+ exit 0
+else
+ res "You seem to be on some non-MIT network that requires registration. Try opening Firefox and visiting any website to register, then try again."
+ exit 4
+fi
Property changes on: trunk/debathena/debathena/debathena-live/share/oncd/bin/netcheck
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/gtk_ui-mods.sed
===================================================================
Added: trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/plugins/debathena.py
===================================================================
--- trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/plugins/debathena.py (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/plugins/debathena.py 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,156 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2005 Canonical Ltd.
+# Written by Xavid <xavid@mit.edu> based on code by
+# Colin Watson <cjwatson@ubuntu.com>.
+#
+# This program 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 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+import copy
+
+from ubiquity.plugin import *
+
+from ubiquity.components import usersetup, debathena_workstation_user_setup
+
+NAME = 'debathena'
+AFTER = None
+WEIGHT = 1
+
+class stash(object):
+ pass
+
+dead_for_workstation = ['fullname_label','fullname','fullname_error_box',
+ 'auto_login','login_pass','login_auto','login_vbox']
+markup_for_workstation = {'username_label':
+ "What's your Athena username?",
+ 'username_extra_label':
+ "<i>You will be an adminstrator on this computer; you can add other adminstrators after installation.</i>",
+ 'password_label':"Choose a root password for this workstation.",
+ 'password_extra_label':"<i>Enter the same password twice. You can log in as root to fix network problems that prevent you from logging in normally.</i>"}
+
+originals = None
+
+class PageGtk(PluginUI):
+ def __init__(self, controller, *args, **kw):
+ self.controller = controller
+ import gtk
+ builder = gtk.Builder()
+ builder.add_from_file('/usr/share/ubiquity/gtk/stepDebathenaType.ui')
+ builder.connect_signals(self)
+ self.page = builder.get_object('stepDebathenaType')
+ self.debathena_workstation = builder.get_object('debathena_workstation')
+ self.debathena_standard = builder.get_object('debathena_standard')
+ self.plugin_widgets = self.page
+
+ def get_debathena_type(self):
+ for b in self.debathena_workstation.get_group():
+ if b.get_active():
+ return b.get_name()
+ def set_debathena_type(self,typ):
+ if not typ.startswith('debathena_') or not hasattr(self,typ):
+ self.error_dialog('Debathena Error',
+ "Debathena type '%s' is illegal!" % typ)
+ getattr(self,typ).set_active(True)
+
+
+
+class Page(Plugin):
+ def prepare(self,unfiltered=False):
+ questions = ['^debathena/type$']
+ return ('/usr/share/ubiquity/debathena',
+ questions)
+
+ def ok_handler(self):
+ global originals, dead_for_workstation
+ typ = self.ui.get_debathena_type()
+
+ if originals is None:
+
+ # Patch originals (i.e., debathena-standard)
+ self.frontend.username_label.set_text(
+ self.frontend.username_label.get_text()+" (You may wish to use your Athena username.)")
+
+ originals = stash()
+ dead_for_workstation = [d for d in dead_for_workstation
+ if hasattr(self.frontend,d)]
+
+ new = 'rm -Rf /target/oncd ; chroot /target /usr/bin/aptitude remove -y casper'
+ if self.frontend.success_cmd:
+ originals.success_cmd = self.frontend.success_cmd+'; '+new
+ else:
+ originals.success_cmd = new
+
+ for i in xrange(len(self.frontend.modules)):
+ if self.frontend.modules[i].module == usersetup:
+ originals.usersetup_index = i
+ break
+ else:
+ raise Exception("page not found")
+
+ originals.usersetup = self.frontend.modules[originals.usersetup_index].filter_class
+ originals.size_requests = dict((d,
+ getattr(self.frontend,d)
+ .get_size_request())
+ for d in dead_for_workstation)
+ originals.markups = dict((m,
+ getattr(self.frontend,m)
+ .get_text())
+ for m in markup_for_workstation)
+
+ # Preseed for debathena
+ self.preseed_bool('apt-setup/universe',True)
+
+ if typ == 'debathena_workstation':
+ # Modify user creation screen
+ # -! this only handles the gtk_ui, much like this whole process
+ self.frontend.modules[originals.usersetup_index].filter_class = debathena_workstation_user_setup.Page
+ for d in dead_for_workstation:
+ w = getattr(self.frontend,d)
+ w.hide()
+ w.set_size_request(0,0)
+ for m in markup_for_workstation:
+ w = getattr(self.frontend,m)
+ w.set_markup(markup_for_workstation[m])
+
+ # Also, install debathena-workstation instead of our current
+ # debathena-login-graphical (we've got the .debs cached)
+ new = "cp /usr/share/ubiquity/policy-rc.d /target/usr/sbin/ && mount --rbind /dev /target/dev && echo 'sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true' | chroot /target debconf-set-selections && chroot /target /usr/bin/xterm -e 'env DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_FRONTEND=noninteractive debconf-apt-progress -- aptitude install -y debathena-workstation' && rm /target/usr/sbin/policy-rc.d"
+ self.frontend.success_cmd = new+'; '+originals.success_cmd
+
+ elif typ == 'debathena_standard':
+ # Undo changes debathena_workstation might have made,
+ # since we could have backtracked
+ self.frontend.modules[originals.usersetup_index].filter_class = originals.usersetup
+ for d in dead_for_workstation:
+ w = getattr(self.frontend,d)
+ if 'error' not in d:
+ w.show()
+ w.set_size_request(*originals.size_requests[d])
+ for m in markup_for_workstation:
+ w = getattr(self.frontend,m)
+ w.set_text(originals.markups[m])
+
+ # Use normal user creation screen, use this magic command
+ # to switch to debathena-standard while purging
+ # debathena-workstation
+ # (I don't think this actually purges its dependencies, though,
+ # just removes them.)
+ new = """cp /usr/share/ubiquity/policy-rc.d /target/usr/sbin/ && mount --rbind /dev /target/dev && chroot /target /usr/bin/xterm -e "debconf-apt-progress -- aptitude install -y 'debathena-standard&m' 'debathena-login-graphical_'" && rm /target/usr/sbin/policy-rc.d"""
+ self.frontend.success_cmd = new+'; '+originals.success_cmd
+ else:
+ assert False, typ
+
+ FilteredCommand.ok_handler(self)
+
Added: trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/ubiquity/components/debathena_workstation_user_setup.py
===================================================================
--- trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/ubiquity/components/debathena_workstation_user_setup.py (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/lib/ubiquity/components/debathena_workstation_user_setup.py 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+
+# Copyright (C) 2005 Canonical Ltd.
+# Written by Xavid <xavid@mit.edu> based on code by
+# Colin Watson <cjwatson@ubuntu.com>.
+#
+# This program 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 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+from ubiquity.components import usersetup
+
+NAME='usersetup'
+
+class Page(usersetup.Page):
+ def prepare(self):
+ cmd,questions = usersetup.Page.prepare(self)
+ questions.append('^passwd/root-login$')
+ questions.append('^passwd/root-password$')
+ questions.append('^passwd/root-password-again$')
+ questions.append('^passwd/make-user$')
+ return (cmd,questions)
+ def ok_handler(self):
+ self.preseed_bool('passwd/root-login', True)
+ self.preseed('passwd/root-password', self.frontend.get_password())
+ self.preseed('passwd/root-password-again',
+ self.frontend.get_verified_password())
+ # Don't actually create user -- this only works if root-login is True
+ # Otherwise you need to do it after user-setup-ask is done
+ self.preseed_bool('passwd/make-user', False)
+
+ usersetup.Page.ok_handler(self)
+
+ new = '; '.join(("for group in %s sudo admin",
+ "do chroot /target /usr/sbin/adduser '%s' $group",
+ "done",
+ "echo 'root:%s' | chroot /target /usr/sbin/chpasswd",
+ "sed -ri 's/AllowRoot=\w+/AllowRoot=true/' /target/etc/gdm/gdm.conf",
+ "echo '%%sudo ALL=(ALL) ALL' >> /target/etc/sudoers"
+ )) % (
+ self.db.get('passwd/user-default-groups'),
+ self.db.get('passwd/username'),
+ self.frontend.get_password().replace("'",
+ """'"'"'""")
+ )
+ self.frontend.success_cmd = new+'; '+self.frontend.success_cmd
+
+
Added: trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/debathena
===================================================================
--- trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/debathena (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/debathena 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,11 @@
+#! /bin/sh
+#set -e
+
+. /usr/share/debconf/confmodule
+
+db_capb backup
+
+db_input high debathena/type || true
+db_go
+
+exit 0
\ No newline at end of file
Property changes on: trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/debathena
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/gtk/stepDebathenaType.ui
===================================================================
--- trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/gtk/stepDebathenaType.ui (rev 0)
+++ trunk/debathena/debathena/debathena-live/share/oncd/ubiquity/share/gtk/stepDebathenaType.ui 2011-09-19 15:49:18 UTC (rev 25398)
@@ -0,0 +1,132 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkVBox" id="stepDebathenaType">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <child>
+ <object class="GtkLabel" id="debathena_heading_label">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><big><b>Debathena Computer Type</b></big></property>
+ <property name="use_markup">True</property>
+ <property name="selectable">True</property>
+ <property name="single_line_mode">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHSeparator" id="hseparator20">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="debathena_type_vbox">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="debathena_type_label">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Select the type of Debathena installation you want on this computer.</property>
+ <property name="selectable">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="debathena_standard_vbox">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="debathena_standard">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Debathena Standard: a personal workstation with full Athena access</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_debathena_type_set"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="left_padding">24</property>
+ <child>
+ <object class="GtkLabel" id="debathena_standard_explanation">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><i>This installation gives your machine full access to Athena services, but uses local user accounts and home directories separate from your Athena account. Only users you create can log in. Recommended for laptops because you can log in even when you don't have internet.</i></property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="debathena_workstation_vbox">
+ <property name="visible">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="debathena_workstation">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Debathena Workstation: a cluster-style graphical workstation with full Athena intergration</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">debathena_standard</property>
+ <signal name="toggled" handler="on_debathena_type_set"/>
+ </object>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="left_padding">24</property>
+ <child>
+ <object class="GtkLabel" id="debathena_workstation_explanation">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><i>This installation configures your machine as an Athena-cluster-style workstation. Anyone can log in with their Athena username and password and access their Athena home directory. Only specified users can log in remotely or administer the system. You don't want this if you don't always have internet or you're behind a NAT. By installing this, you agree to Sun's Operating System Distributor License for Java version 1.1 (http://dlc.sun.com/dlj/DLJ-v1.1.txt).</i></property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
Added: trunk/debathena/debathena/debathena-live/share/splash/splash1.png
===================================================================
(Binary files differ)
Property changes on: trunk/debathena/debathena/debathena-live/share/splash/splash1.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/debathena/debathena/debathena-live/share/splash/splash2.png
===================================================================
(Binary files differ)
Property changes on: trunk/debathena/debathena/debathena-live/share/splash/splash2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream