[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. 68d149398d50c734c9db76a82dd7d25894b738b4
Steffen Moeller
steffen_moeller at gmx.de
Sat Feb 21 12:42:21 UTC 2009
The following commit has been merged in the master branch:
commit 33d9c947b3526a6aba7c9901b1800da987cdf9da
Merge: fb2cd200bd5cca6e20a244c106bfcde5d1844ade 00ca1d159ecdcca5ab50b7e24e4d9b67862cf8f9
Author: Steffen Moeller <steffen_moeller at gmx.de>
Date: Sat Feb 21 02:18:29 2009 +0100
Merge branch 'gregorWicd'
diff --combined install.sh
index 63da1b6,efa63e4..81df3d4
--- a/install.sh
+++ b/install.sh
@@@ -54,6 -54,7 +54,7 @@@ FSO_DEVICE=${FSO_DEVICE:-gta02
QI=${QI:-false}
QI_VERBOSE_BOOT=${QI_VERBOSE_BOOT:-false}
SINGLE_PART=${SINGLE_PART:-$QI}
+ WITH_WIFI=${WITH_WIFI:-none}
# hardening for the case that a user uses capitals
lc SD_PART1_FS SD_PART2_FS APT_RECOMMENDS QI QI_VERBOSE_BOOT FSO_DEVICE
@@@ -75,6 -76,7 +76,7 @@@ DROPBEAR_KEYS="/etc/dropbear/dropbear_r
# cdebootstrap options
# with packages for a basic debian with network connectivity
+ CDEBOOTSTRAP_FLAVOUR=minimal
CDEBOOTSTRAP_PACKAGE=$INST_MIRROR/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb
CDEBOOTSTRAP_EXTRA_PACKAGES=ifupdown,dropbear,udev,procps,netbase,vim-tiny,module-init-tools,wget,openssh-client
# This gets passed to cdebuildstrap. currently not used
@@@ -102,12 -104,12 +104,12 @@@ TAR_PACKAGE=$INST_MIRROR/pool/main/t/ta
# fight against auto-mounting
umount_all () {
- if [ -n "$verbose" ]; then echo "Now unmounting all SD devices."; fi
+ if [ -n "$VERBOSE" ]; then echo "Now unmounting all SD devices."; fi
for I in $(seq 0 9); do
cmd="mount | grep -q '^${SD_DEVICE}p$I'"
- if [ -n "$verbose" ]; then echo -n " testing #$I ($cmd)"; fi
+ if [ -n "$VERBOSE" ]; then echo -n " testing #$I ($cmd)"; fi
if mount | grep -q "^${SD_DEVICE}p$I" ; then
- if [ -n "$verbose" ]; then
+ if [ -n "$VERBOSE" ]; then
echo " unmounting"
else
echo "W: ${SD_DEVICE}p$I is mounted, unmounting"
@@@ -117,11 -119,11 +119,11 @@@
# echo "E: Unmount failed"
# exit 1
# fi
- elif [ -n "$verbose" ]; then
+ elif [ -n "$VERBOSE" ]; then
echo 'not mounted'
fi
done
- if [ -n "$verbose" ]; then echo "All SD devices unmounted."; fi
+ if [ -n "$VERBOSE" ]; then echo "All SD devices unmounted."; fi
}
five_seconds_to_quit () {
@@@ -175,10 -177,7 +177,10 @@@ DESCRIPTIO
cdebootstrap to prepare a directory to which it can chroot(8)
and complete the configuration.
- Variables:
+ENVIRONMENT
+
+ To influence the program's behaviour, set the following
+ environment variables or leave the default values.
HOSTNAME the name of the machine (default to debian-gta02)
SD_DEVICE the character device to access the microSD card
@@@ -208,6 -207,9 +210,9 @@@
do this only when QI=true (default to false)
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').
Stages:
@@@ -251,6 -253,7 +256,7 @@@ OPTION
--part1-fs sets the SD_PART1_FS variable
--part1-size sets the SD_PART1_SIZE variable
--swap-size sets the SD_SWAP_SIZE variable
+ --with-wifi sets the WITH_WIFI variable
BUGS
Only the current (second) generation of devices is supported.
@@@ -325,7 -328,7 +331,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__
@@@ -508,7 -511,7 +514,7 @@@ echo "w" >> /tmp/argsToFdisk$
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
@@@ -564,15 -567,15 +570,15 @@@ action_mount ()
echo "Mounting the newly created system"
if [ -d "$INST_DIR" ]; then
mkdir -p $INST_DIR;
- elif [ -n "$verbose" ]; then
+ elif [ -n "$VERBOSE" ]; then
echo "Not creating directory '$INST_DIR', it is already existing."
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."
@@@ -598,8 -601,31 +604,31 @@@ tar -xz -C / -f /tmp/data.tar.g
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"
+ 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-static --allow-unauthenticated --flavour minimal --include=$CDEBOOTSTRAP_EXTRA_PACKAGES --exclude=$CDEBOOTSTRAP_EXCLUDE_PACKAGES sid $INST_DIR $INST_MIRROR
+ CDEBOOTSTRAP_EXTRA_FLAGS=""
+ if [ -n "$VERBOSE" ]; then
+ CDEBOOTSTRAP_EXTRA_FLAGS="$CDEBOOTSTRAP_EXTRA_FLAGS -v"
+ fi
+ cdebootstrap-static $CDEBOOTSTRAP_EXTRA_FLAGS --allow-unauthenticated --flavour $CDEBOOTSTRAP_FLAVOUR --include=$CDEBOOTSTRAP_EXTRA_PACKAGES --exclude=$CDEBOOTSTRAP_EXCLUDE_PACKAGES sid $INST_DIR $INST_MIRROR
echo "I: basic Debian system installed"
}
@@@ -791,6 -817,26 +820,26 @@@ echo " * Installing dash as /bin/sh: $D
echo 'dash dash/sh string $DASH_BINSH' | chroot $INST_DIR debconf-set-selections
chroot $INST_DIR apt-get --yes --force-yes 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"
chroot $INST_DIR apt-get --yes install wpasupplicant wireless-tools udhcpc
@@@ -807,6 -853,14 +856,14 @@@ zhone
exec matchbox-window-manager -use_titlebar no -use_cursor no
EOMATCHBOX
+ case "$WITH_WIFI" in
+ "wicd")
+ sed -i '/^exec/iwicd-client --no-animate &' $INST_DIR/root/.xsession
+ ;;
+ *)
+ ;;
+ esac
+
echo "I: System configured"
}
@@@ -966,7 -1020,7 +1023,7 @@@ f
# internal variable
- verbose=""
+ VERBOSE=""
showHelp=""
# parse options
@@@ -984,7 -1038,7 +1041,7 @@@ d
showHelp="true"
;;
"--verbose")
- verbose="true"
+ VERBOSE="true"
;;
"-v")
echo "$VERSION"
@@@ -1008,6 -1062,10 +1065,10 @@@
assignNumeric="true"
assignVariablename="SD_SWAP_SIZE"
;;
+ "--with-wifi")
+ assignParametername="$i"
+ assignVariablename="WITH_WIFI"
+ ;;
"all")
action_testing
action_time
--
Various non-packaged files
More information about the pkg-fso-commits
mailing list