Hi x,

many thanks for your contribution. Joachim, please have a look at x's changes 
to the uboot
 install, I don't want to tamper with this, it seems to make sense.

I have taken the fixes of yours as listed below. The crypto bits could go into 
a separate
branch. But I cannot maintain it. Strategically I feel that Joachim is right in 
that this
could possibly wait for a regular debian-installer based setup as this is 
rather advanced
and probably of interest for other setups, too.

Concerning your changes to the output redirection - why is  > filename inferior 
over
>filename ? I much prefer the prior.

I put the ">/dev/null 2>&1" in for now, but we will need to abstract from that, 
possibly
by introducing some option for quietness of some sort.

Many greetings

Steffen

@@ -434,7 +564,7 @@ action_testing () {

 action_time () {
        echo "Fetching time from $RDATEHOST with rdate"
-       rdate -s "$RDATEHOST"
+       rdate -s "$RDATEHOST" >/dev/null 2>&1
        echo "I: Time is now `date`"
 }

@@ -447,15 +577,21 @@ action_partition () {
        umount_all

        # put the partition table in a "known state"
-       dd if=/dev/zero of=$SD_DEVICE bs=512 count=1
+       echo "Clearing MBR of SD."
+       if ! dd if=/dev/zero of=$SD_DEVICE bs=512 count=1 >/dev/null 2>&1; then
+               echo "Clearing MBR of SD with dd failed ($?)."
+               exit 1
+       fi


-       mb=$(echo pq | fdisk /dev/mmcblk0 | grep Disk| cut -f 3 -d \ )
-       cylinders=$(echo pq | fdisk /dev/mmcblk0 | grep cylinders|grep 
heads|cut -f 5 -d\ )
-       lastcylinder=$(($cylinders-($cylinders*$SD_SWAP_SIZE/$mb)))
+#      mb=$(echo pq | fdisk /dev/mmcblk0 | grep Disk | cut -f 3 -d \ )
+       mb=$(sfdisk -s ${SD_DEVICE} 2>/dev/null)
+#      cylinders=$(echo pq | fdisk /dev/mmcblk0 | grep cylinders | grep heads 
| cut -f 5 -d\ )
+       cylinders=$(sfdisk -G ${SD_DEVICE} 2>/dev/null | grep "^${SD_DEVICE}" | 
awk "{ print \$2 }")
+       lastcylinder=$(($cylinders-($cylinders*$SD_SWAP_SIZE/($mb/1024))))

My previous routine I has worked for me. I have changed the copy'n'paste error 
with the
SD_DEVICE, but will need to test your approach first.


@@ -524,7 +660,7 @@ EOSWAPCONF
        else
                echo "Partitioning failed, could not execute with fdisk:"
                cat /tmp/argsToFdisk$$
-               exit -1
+               exit 1
        fi

@@ -653,7 +800,7 @@ action_apt () {
        echo "Configuring APT"

        echo " * Creating /etc/apt/sources.list"
-       cat > $INST_DIR/etc/apt/sources.list <<__END__
+       cat >"$INST_DIR/etc/apt/sources.list" <<__END__
 deb $INST_MIRROR unstable main



@@ -765,25 +917,25 @@ __END__

        echo " * Creating /etc/fstab"
        mkdir -p $INST_DIR/mnt/flash
-       cat > $INST_DIR/etc/fstab <<__END__
+       cat >"$INST_DIR/etc/fstab" <<__END__

and other "$INST_DIR" that are not quoted.

@@ -946,10 +1145,10 @@ __END_CHROOT__
                BOOT_DIR=$INST_DIR/boot/boot
                if [ "$SINGLE_PART" = "true" ]; then
                        BOOT_DIR=$INST_DIR/boot
-                       ln -s uImage.bin $BOOT_DIR/uImage-GTA02.bin
+                       ln -fs uImage.bin $BOOT_DIR/uImage-GTA02.bin
                else
                        mkdir $BOOT_DIR
-                       ln -s ../uImage.bin $BOOT_DIR/uImage-GTA02.bin
+                       ln -fs ../uImage.bin $BOOT_DIR/uImage-GTA02.bin



_______________________________________________
pkg-fso-maint mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-fso-maint

Reply via email to