[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. 50c870bd1e33805ce150177e3256c7c4d65f5b88
Steffen Moeller
moeller at debian.org
Thu Mar 19 16:32:34 UTC 2009
The following commit has been merged in the master branch:
commit 50c870bd1e33805ce150177e3256c7c4d65f5b88
Author: Steffen Moeller <moeller at debian.org>
Date: Wed Mar 18 13:36:13 2009 +0100
Added APT_OPTIONS to install of wicd
Responing "n" to the question if wicd should be installed
will stop the installation process.
diff --git a/install.sh b/install.sh
index a013290..3129466 100755
--- a/install.sh
+++ b/install.sh
@@ -119,6 +119,30 @@ TAR_PACKAGE=$INST_MIRROR/pool/main/t/tar/tar_1.20-1_armel.deb
# FUNCTIONS
#
+# for the installation of packages, /proc is sometimes required to be
+# installed. cdebootstrap is installing it itself.
+ensure_proc_is_mounted () {
+
+ if [ ! -d "$INST_DIR/proc" ]; then mkdir "$INST_DIR/proc"; fi
+
+ if mount | grep -q "$INST_DIR/proc"; then
+ if [ -n "$VERBOSE" ]; then
+ echo "I: /proc is already mounted in chroot"
+ fi
+ return 0;
+ fi
+
+ if mount -t proc none "$INST_DIR/proc"; then
+ echo "I: installed /proc in chroot"
+ return 0;
+ else
+ echo "E: could not mount /proc in chroot"
+ return 1;
+ fi
+
+}
+
+
# fight against auto-mounting
umount_all () {
if [ -n "$VERBOSE" ]; then echo "Now unmounting all SD devices."; fi
@@ -696,6 +720,7 @@ action_mount () {
fi
fi
echo "I: microSD card partitions mounted"
+
}
@@ -731,6 +756,8 @@ action_debian () {
action_apt () {
echo "Configuring APT"
+ ensure_proc_is_mounted
+
echo " * Creating /etc/apt/sources.list"
cat > "$INST_DIR/etc/apt/sources.list" <<__END__
deb $INST_MIRROR unstable main
@@ -785,6 +812,9 @@ __END_CHROOT__
#
action_fso () {
# TODO
+
+ ensure_proc_is_mounted
+
echo "Installing FSO-specific packages"
chroot "$INST_DIR" /bin/sh -e <<__END_CHROOT__
apt-get $APT_OPTIONS install $FSO_PACKAGES
@@ -820,6 +850,8 @@ action_tasks () {
echo "Performing selected tasks: $TASKS"
+ ensure_proc_is_mounted
+
for intern_task in $( echo $TASKS|tr "," " ")
do
echo " * task: $intern_task"
@@ -841,7 +873,7 @@ action_tasks () {
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
+ chroot "$INST_DIR" apt-get install $APT_OPTIONS wicd
echo " * All extra activity for task '$intern_task' completed."
;;
@@ -860,6 +892,8 @@ action_tasks () {
action_configuration () {
echo "Configuring system files for ${FSO_DEVICE}"
+ ensure_proc_is_mounted
+
if [ "true" = "$LOCALEPURGE" ]; then
echo " * installing localepurge"
chroot "$INST_DIR" apt-get $APT_OPTIONS install localepurge
@@ -1015,6 +1049,8 @@ EOMATCHBOX
action_kernel () {
echo "Installing kernel package"
+ ensure_proc_is_mounted
+
intern_cmd="apt-get $APT_OPTIONS install linux-image-2.6.28-openmoko-gta02"
if [ "$SD_PART1_FS" = "vfat" ]; then
@@ -1192,7 +1228,22 @@ __END_CHROOT__
# Stage unmount
#
action_unmount () {
- echo "Unmounting microSD card partitions"
+
+ echo "Unmounting"
+
+ if mount | grep -q "$INST_DIR/proc"; then
+ echo -n " * Unmounting proc from install directory"
+ if umount "$INST_DIR/proc"; then
+ echo " [ok]"
+ else
+ echo " [failed]"
+ fi
+ elif [ -n "$VERBOSE" ]; then
+ echo "I: /proc directory not mounted to install directory"
+ fi
+
+
+ echo " * Unmounting microSD card partitions"
if [ "$SINGLE_PART" != "true" ]; then
umount "$INST_DIR/boot"
fi
--
Various non-packaged files
More information about the pkg-fso-commits
mailing list