[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. ad47764c50b622f039bcbfcbcabcf4fea30ad392
Steffen Moeller
moeller at debian.org
Sat Feb 28 14:56:05 UTC 2009
The following commit has been merged in the master branch:
commit 076691eaf0d459792266aee582dbabe5d1981ffb
Author: Steffen Moeller <moeller at debian.org>
Date: Fri Feb 27 22:17:48 2009 +0100
Prepared for TASKS
diff --git a/install.sh b/install.sh
index 85b038f..71003d8 100755
--- a/install.sh
+++ b/install.sh
@@ -43,6 +43,7 @@ lc () {
APT_OPTIONS=${APT_OPTIONS:- --yes}
APT_RECOMMENDS=${APT_RECOMMENDS:-false}
DASH_BINSH=${DASH_BINSH:-true}
+EXTRA_TASKS=""
FSO_MIRROR=${FSO_MIRROR:-http://pkg-fso.alioth.debian.org/debian}
FSO_DEVICE=${FSO_DEVICE:-gta02}
HOSTNAME=${HOSTNAME:-debian-gta02}
@@ -76,6 +77,9 @@ RDATEHOST=ntp.fu-berlin.de
WPA_SUPPLICANT_CONF=/etc/wpa_supplicant/wpa_supplicant.conf
DROPBEAR_KEYS="/etc/dropbear/dropbear_rsa_host_key /etc/dropbear/dropbear_dss_host_key"
+# internal variables
+intern_instdir_already_present=""
+
# cdebootstrap options
# with packages for a basic debian with network connectivity
CDEBOOTSTRAP_FLAVOUR=minimal
@@ -91,7 +95,10 @@ xserver-xorg-video-fbdev xserver-xorg-input-tslib xterm xinit xfonts-base x11-xs
xserver-xorg-input-all- xserver-xorg-input-synaptics- xserver-xorg-input-wacom- xserver-xorg-video-all- xserver-xorg-video-v4l- xserver-xorg-video-voodoo- xserver-xorg-video-vga- xserver-xorg-video-vesa- xserver-xorg-video-tseng- xserver-xorg-video-trident- xserver-xorg-video-tga- xserver-xorg-video-tdfx- xserver-xorg-video-sisusb- xserver-xorg-video-sis- xserver-xorg-video-siliconmotion- xserver-xorg-video-savage- xserver-xorg-video-s3virge- xserver-xorg-video-s3- xserver-xorg-video-rendition- xserver-xorg-video-radeonhd- xserver-xorg-video-nv- xserver-xorg-video-nsc- xserver-xorg-video-neomagic- xserver-xorg-video-mga- xserver-xorg-video-imstt- xserver-xorg-video-i740- xserver-xorg-video-i128- xserver-xorg-video-glint- xserver-xorg-video-dummy- xserver-xorg-video-cyrix- xserver-xorg-video-chips- xserver-xorg-video-ati- xserver-xorg-video-radeon- xserver-xorg-video-mach64- xserver-xorg-video-r128- xserver-xorg-video-cirrus- xserver-xorg-video-ark- xserver-xorg-video-apm-"
# Games sufficiently well suited for the FreeRunner
-GAMES_PACKAGES="mokomaze"
+PACKAGES_TASK_GAMES="mokomaze sgt-puzzles"
+PACKAGES_TASK_GPS="tangogps"
+PACKAGES_TASK_PHONE="zhone"
+PACKAGES_TASK_WEB="midori"
# device-specific values
UBOOT_ENV_SIZE=262144
@@ -217,17 +224,12 @@ ENVIRONMENT
do this only when QI=true (set to '$QI_VERBOSE_BOOT')
SINGLE_PART set this to true if only one partition should be created
this is true by default for QI=true and false if SD_PART1_FS=vfat
- WITH_WIFI determines how to configure the wireless connections. Set
- to 'none' will not install anything (default), 'wicd' is
- supported as an experimental setup (set to '$WITH_WIFI').
- This is not yet functional.
Stages:
- minimal Runs all the stages in the following order:
+ all Runs all the stages in the following order:
testing time partition format mount debian
- apt fso configuration kernel unmount
- all Like 'minimal', but also installs a selection of games.
+ apt fso configuration kernel tasks unmount
testing Verifys that everything is in place for this
installer to work
time Fetches the current time from $RDATEHOST via rdate
@@ -243,9 +245,20 @@ ENVIRONMENT
debian Installs a basic Debian system, including an SSH server
apt Configure APT
fso Installs packages required to use the Zhone GUI
- games Installs games that were designed with FreeRunner-like
- devices in mind (currently this is only mokomaze, an
- upcoming candidate is numpy-physics).
+ tasks Installs packages for a series of tasks. Supported are
+ GAMES Installs games that were designed with
+ FreeRunner-like devices in mind (currently
+ this is only mokomaze) or that have been found
+ compatible (sgt-puzzles, an upcoming candidate
+ is numpy-physics).
+ GPS Software for GPS, geocaching and navigation
+ (only tangogps as a technical exercise for the
+ moment)
+ PHONE zhone (always selected)
+ WEB midori
+ WIFI wicd
+ To specify the tasks shall be assigned to the TASKS
+ environment variable as a comma separated list.
configuration Configures various parts of the system, such as
the X server
kernel Downloads and installs the Debian kernel package
@@ -602,9 +615,11 @@ action_format () {
action_mount () {
echo "Mounting the newly created system"
if [ -d "$INST_DIR" ]; then
- mkdir -p "$INST_DIR";
+ mkdir -p "$INST_DIR";
+ intern_instdir_already_present=""
elif [ -n "$verbose" ]; then
echo "Not creating directory '$INST_DIR', it is already existing."
+ intern_instdir_already_present="true"
fi
if [ "$SINGLE_PART" = "true" ]; then
if [ -n "$verbose" ]; then echo "Preparing single ext2 device."; fi
@@ -637,32 +652,6 @@ action_debian () {
rm -f /tmp/data.tar.gz
rm -f /tmp/cdebootstrap.deb
- # extra packages for additional software to be installed
- case "$WITH_WIFI" in
- "wicd")
- echo " * added wicd to list of packages to install"
- echo
- echo " W: You have selected the option --with-wifi wicd"
- echo " which is still under development. Please don't"
- echo " expect it to work, you will have to manually"
- echo " install the wicd package after booting into"
- echo " the system."
- echo
- CDEBOOTSTRAP_EXTRA_PACKAGES=$CDEBOOTSTRAP_EXTRA_PACKAGES,wicd
- #CDEBOOTSTRAP_FLAVOUR=build
- ;;
- "none")
- if [ -n "$VERBOSE" ]; then echo "* support for wifi left for manual installation"; fi
- ;;
- *)
- echo
- echo "Unsupported Wifi: '$WITH_WIFI'."
- echo
- exit 1
- ;;
- esac
-
-
echo " * Running cdebootstrap to install the system (might take a while)"
CDEBOOTSTRAP_EXTRA_FLAGS=""
if [ -n "$VERBOSE" ]; then
@@ -724,15 +713,51 @@ __END_CHROOT__
#
-# Stage games
+# Stage tasks
#
-action_games () {
- echo "Installing a selection of games"
- chroot "$INST_DIR" /bin/sh -e <<__END_CHROOT__
-apt-get $APT_OPTIONS install $GAMES_PACKAGES
-apt-get clean
-__END_CHROOT__
- echo "I: Selection of nice games installed"
+# These steps shall be executed only after all basic packages
+# have been installed.
+#
+action_tasks () {
+
+ if [ -z "$TASKS" ]; then
+ if [ -n "$VERBOSE" ]; then
+ echo
+ echo "No task selected."
+ echo
+ fi
+ return 0;
+ fi
+
+ echo "Performing selected tasks: $TASKS"
+
+ for $intern_task in $TASKS
+ do
+ echo " * task: $intern_task"
+ eval chroot "$INST_DIR" apt-get install $APT_OPTIONS \$PACKAGES_TASKS_$intern_task
+ chroot "$INST_DIR" apt-get clean
+ echo "I: Selection of packages for task $intern_task installed"
+
+ case "$intern_task" in
+ "WIFI")
+ #sed -i '/^exec/iif [ -x /usr/bin/wicd-client ]; then wicd-client --no-animate &; fi' "$INST_DIR/root/.xsession"
+ sed -i '/^exec/i#wicd-client --no-animate &' "$INST_DIR/root/.xsession"
+ echo " * Installing wicd for wifi setup"
+ if [ -r "$INST_DIR/etc/wicd/manager-settings.conf" ]; then
+ grep -v ^wired_interface "$INST_DIR/etc/wicd/manager-settings.conf" > \
+ "$INST_DIR/etc/wicd/manager-settings.conf"
+ else
+ mkdir "$INST_DIR/etc/wicd"
+ echo "[Settings]" >> "$INST_DIR/etc/wicd/manager-settings.conf"
+ fi
+ echo "wired_interface =" >> "$INST_DIR/etc/wicd/manager-settings.conf"
+ echo " * All extra activity for task '$intern_task' completed."
+ ;;
+ *)
+ echo " * No extra activity for task '$intern_task'."
+ ;;
+ esac
+ done
}
@@ -872,25 +897,6 @@ __END__
echo 'dash dash/sh string $DASH_BINSH' | chroot "$INST_DIR" debconf-set-selections
chroot "$INST_DIR" apt-get $APT_OPTIONS install dash
- case "$WITH_WIFI" in
- "wicd")
- # the package was already installed via cdebootstrap
- echo " * Installing wicd for wifi setup"
- if [ -r "$INST_DIR/etc/wicd/manager-settings.conf" ]; then
- grep -v ^wired_interface "$INST_DIR/etc/wicd/manager-settings.conf" > \
- "$INST_DIR/etc/wicd/manager-settings.conf"
- else
- mkdir "$INST_DIR/etc/wicd"
- fi
- echo "wired_interface =" >> "$INST_DIR/etc/wicd/manager-settings.conf"
- ;;
-
- "none")
- # no installation to be performed
- ;;
- *)
- ;;
- esac
if [ -f "$WPA_SUPPLICANT_CONF" ]; then
echo " * Installing wpasupplicant, wireless-tools and udhcpc"
@@ -908,15 +914,6 @@ zhone &
exec matchbox-window-manager -use_titlebar no -use_cursor no
EOMATCHBOX
- case "$WITH_WIFI" in
- "wicd")
- #sed -i '/^exec/iif [ -x /usr/bin/wicd-client ]; then wicd-client --no-animate &; fi' "$INST_DIR/root/.xsession"
- sed -i '/^exec/i#wicd-client --no-animate &' "$INST_DIR/root/.xsession"
- ;;
- *)
- ;;
- esac
-
echo "I: System configured"
}
@@ -1107,8 +1104,37 @@ action_unmount () {
if [ "$SINGLE_PART" != "true" ]; then
umount "$INST_DIR/boot"
fi
- umount "$INST_DIR"
+ if ! umount "$INST_DIR"; then
+ echo "W: Could not unmount install directory '$INST_DIR'."
+ return 1;
+ fi
echo "I: microSD card partitions unmounted"
+
+ if [ -z "$intern_instdir_already_present" -o "no" = "$intern_instdir_already_present" ]; then
+ if ! rmdir "$INST_DIR"; then
+ echo "W: Could not remove directory '$INST_DIR'."
+ echo
+ fi
+
+ cat <<EOINSTRUCTIONS
+
+The directory '$INST_DIR' to which Debian was installed
+is not available any longer. You may want to consider to
+recreate the directory '$INSTDIR' with
+
+mkdir "$INST_DIR"
+
+and add the line
+
+/dev/mmcblk0p2 $INST_DIR auto defaults,async 0 0
+
+to the file /etc/fstab, so it will be mounted with subsequent
+boots into the current system.
+
+EOINSTRUCTIONS
+ fi
+
+ return 0
}
#
--
Various non-packaged files
More information about the pkg-fso-commits
mailing list