[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. d01a461083d18e8fd08fae1ec658b2086a9b6cb5
Steffen Moeller
moeller at debian.org
Tue Mar 10 22:32:06 UTC 2009
The following commit has been merged in the master branch:
commit d01a461083d18e8fd08fae1ec658b2086a9b6cb5
Merge: a4694dfd26bbf16785e80a5fa8e2550a0f09a36d 538050b414247d795d24b050c6b9421e4043124e
Author: Steffen Moeller <moeller at debian.org>
Date: Tue Mar 10 21:07:35 2009 +0100
Merge branch 'master' of ssh://moeller@git.debian.org/git/pkg-fso/files
diff --combined install.sh
index 4a94711,2c1de36..ea3694b
--- a/install.sh
+++ b/install.sh
@@@ -71,9 -71,9 +71,9 @@@ f
# general variables
VERSION=1.1
-TESTHOST=www.debian.org
-RDATEHOST=ntp.fu-berlin.de
-WPA_SUPPLICANT_CONF=/etc/wpa_supplicant/wpa_supplicant.conf
+VERBOSE=${VERBOSE:-}
+TESTHOST=${TESTHOST:-www.debian.org}
+RDATEHOST=${RDATEHOST:-ntp.fu-berlin.de}
DROPBEAR_KEYS="/etc/dropbear/dropbear_rsa_host_key /etc/dropbear/dropbear_dss_host_key"
# internal variables
@@@ -98,7 -98,6 +98,7 @@@ PACKAGES_TASK_GAMES="mokomaze sgt-puzzl
PACKAGES_TASK_GPS="tangogps"
PACKAGES_TASK_PHONE="zhone"
PACKAGES_TASK_WEB="midori"
+PACKAGES_TASK_WIFI="dhcp3-client wpasupplicant wireless-tools"
# device-specific values
UBOOT_ENV_SIZE=262144
@@@ -142,8 -141,8 +142,8 @@@ five_seconds_to_quit ()
# since dash doesn't support 'read' -t and -n options, this script
# should be executed only by /bin/bash. However, all official
# Openmoko images use busybox, which doesn't provide /bin/bash
- read -t 5 -n 1 VAR || VAR=continue
- if [ "$VAR" != "continue" ]; then
+ read -t 5 -n 1 intern_var || intern_var=continue
+ if [ "$intern_var" != "continue" ]; then
echo "E: aborting on user request"
exit 1
fi
@@@ -222,13 -221,8 +222,13 @@@ ENVIRONMEN
(set to '$QI')
QI_VERBOSE_BOOT set this to true if you want to see the kernel messages
do this only when QI=true (set to '$QI_VERBOSE_BOOT')
+ RDATEHOST machine with which to sync against with ntp (set to $RDATEHOST)
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
+ (set to '$SINGLE_PART')
+ TESTHOST name of machine that should be tested for availability
+ (set to '$TESTHOST')
+ VERBOSE increase amount of information that is forwarded to stdout
Stages:
@@@ -261,7 -255,7 +261,7 @@@
moment)
PHONE zhone (always selected)
WEB midori
- WIFI wicd
+ WIFI wicd, wireless-tools, wpasupplicant, dhcp3-client
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
@@@ -291,8 -285,6 +291,8 @@@ OPTION
sets the SD_PART1_SIZE variable
--swap-size <megabytes>
sets the SD_SWAP_SIZE variable
+ --with-tasks <tasks>
+ sets the TASKS variable
EXAMPLE
@@@ -390,7 -382,7 +390,7 @@@ __END_
for f in testing time partition format mount debian apt fso configuration kernel unmount
do
- if [ -n "$verbose" ]; then echo calling '$f'; fi
+ if [ -n "$VERBOSE" ]; then echo calling '$f'; fi
action_$f
done
cat <<__END__
@@@ -422,14 -414,12 +422,14 @@@ action_testing ()
fi
echo " * microSD card device: $SD_DEVICE present"
- for BINARY in wget ping fdisk mount umount mkfs.$SD_PART1_FS mkfs.$SD_PART2_FS gunzip dd sed rdate; do
- if ! which $BINARY > /dev/null; then
- echo "E: Could not find $BINARY binary"
+ for intern_binary in wget ping fdisk mount umount mkfs.$SD_PART1_FS mkfs.$SD_PART2_FS mkswap gunzip dd sed rdate ar; do
+ if ! which $intern_binary > /dev/null; then
+ echo "E: Could not find $intern_binary binary"
exit 1
fi
- echo " * $BINARY installed"
+ if [ -n "$VERBOSE" ]; then
+ echo " * $intern_binary installed"
+ fi
done
if tar --help 2>&1 | grep "Usage: tar \-\[cxtvO\]" >/dev/null; then
@@@ -589,7 -579,7 +589,7 @@@ EOSWAPCON
if fdisk $SD_DEVICE < /tmp/argsToFdisk$$; then
echo "Partitioning was successful."
- if [ -n "$verbose" ]; then
+ if [ -n "$VERBOSE" ]; then
echo "The following partitions have been created:"
echo "pq" | fdisk $SD_DEVICE
fi
@@@ -602,20 -592,20 +602,20 @@@
echo " * Waiting for partitions to appear"
- SLEEP_SECONDS=3
+ intern_sleep_seconds=3
if [ "$SINGLE_PART" = "true" ]; then
- DEVTEST="test -e ${SD_DEVICE}p1"
+ intern_devtest="test -e ${SD_DEVICE}p1"
else
- DEVTEST="test -e ${SD_DEVICE}p1 -a -e ${SD_DEVICE}p2"
+ intern_devtest="test -e ${SD_DEVICE}p1 -a -e ${SD_DEVICE}p2"
fi
- while ! $DEVTEST; do
- if [ "$SLEEP_SECONDS" = 15 ]; then
+ while ! $intern_devtest; do
+ if [ "$intern_sleep_seconds" = 15 ]; then
echo "E: Partitioning has failed, partitions have not been created"
exit 1
fi
sleep 3
- SLEEP_SECONDS=`expr $SLEEP_SECONDS + 3`
+ intern_sleep_seconds=$(( $intern_sleep_seconds + 3 ))
done
echo " * Partition table created"
}
@@@ -631,17 -621,9 +631,17 @@@ action_format ()
echo " * Formatting the microSD card partitions"
if [ "$SINGLE_PART" = "true" ]; then
mkfs.ext2 ${SD_DEVICE}p1
+ if [ -n "$SD_SWAP_SIZE" ]; then
+ echo " * Formatting swap on ${SD_DEVICE}p2"
+ mkswap ${SD_DEVICE}p2
+ fi
else
mkfs.$SD_PART1_FS ${SD_DEVICE}p1
mkfs.$SD_PART2_FS ${SD_DEVICE}p2
+ if [ -n "$SD_SWAP_SIZE" ]; then
+ echo " * Formatting swap on ${SD_DEVICE}p3"
+ mkswap ${SD_DEVICE}p3
+ fi
fi
echo "I: microSD card ready"
@@@ -652,19 -634,19 +652,19 @@@
#
action_mount () {
echo "Mounting the newly created system"
- if [ -d "$INST_DIR" ]; then
+ if [ ! -d "$INST_DIR" ]; then
mkdir -p "$INST_DIR";
intern_instdir_already_present=""
- elif [ -n "$verbose" ]; then
+ 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
+ if [ -n "$VERBOSE" ]; then echo "Preparing single ext2 device."; fi
mount -t auto ${SD_DEVICE}p1 "$INST_DIR"
mkdir -p "$INST_DIR/boot"
else
- if [ -n "$verbose" ]; then echo "Mounting root partition to '$INST_DIR'."; fi
+ if [ -n "$VERBOSE" ]; then echo "Mounting root partition to '$INST_DIR'."; fi
mount -t auto ${SD_DEVICE}p2 "$INST_DIR"
if [ "vfat" = "$SD_PART1_FS" ]; then
echo "You have a vfat boot filesystem. This is not mounted to /boot."
@@@ -800,8 -782,7 +800,8 @@@ action_tasks ()
case "$intern_task" in
"WIFI")
- #sed -i '/^exec/iif [ -x /usr/bin/wicd-client ]; then wicd-client --no-animate &; fi' "$INST_DIR/root/.xsession"
+
+ echo " * modifying .xsession to autostart wicd-client"
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
@@@ -812,10 -793,8 +812,10 @@@
echo "[Settings]" >> "$INST_DIR/etc/wicd/manager-settings.conf"
fi
echo "wired_interface =" >> "$INST_DIR/etc/wicd/manager-settings.conf"
+ chroot "$INST_DIR" apt-get install wicd
echo " * All extra activity for task '$intern_task' completed."
;;
+
*)
echo " * No extra activity for task '$intern_task'."
;;
@@@ -960,6 -939,14 +960,6 @@@ __END_
echo 'dash dash/sh string $DASH_BINSH' | chroot "$INST_DIR" debconf-set-selections
chroot "$INST_DIR" apt-get $APT_OPTIONS install dash
-
- if [ -f "$WPA_SUPPLICANT_CONF" ]; then
- echo " * Installing wpasupplicant, wireless-tools and udhcpc"
- chroot "$INST_DIR" apt-get $APT_OPTIONS install wpasupplicant wireless-tools udhcpc
- echo " * $WPA_SUPPLICANT_CONF copied from this machine"
- cat > "$INST_DIR$WPA_SUPPLICANT_CONF" <$WPA_SUPPLICANT_CONF
- fi
-
echo " * Installing /root/.xsession"
cat > "$INST_DIR/root/.xsession" <<EOMATCHBOX
#!/bin/sh
@@@ -1267,11 -1254,6 +1267,6 @@@ d
action_tasks
fi
action_kernel
- if [ "vfat" == "SD_PART1_FS" ]; then
- echo "Skipping uboot modification since boot partition is of type '$SD_PART1_FS'."
- else
- action_uboot
- fi
action_unmount
;;
"testing"|"time"|"partition"|"format"|"mount"|"debian"|"apt"|"fso"|"configuration"|"kernel"|"unmount"|"uboot"|"tasks")
--
Various non-packaged files
More information about the pkg-fso-commits
mailing list