slitaz-tools rev 476

bootfloppybox: fix output directory
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 28 17:59:24 2010 +0200 (2010-03-28)
parents 694ff35aa085
children e9173d4733e4
files tinyutils/bootfloppybox
line diff
     1.1 --- a/tinyutils/bootfloppybox	Sun Mar 28 18:43:29 2010 +0200
     1.2 +++ b/tinyutils/bootfloppybox	Sun Mar 28 17:59:24 2010 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4  # 
     1.5  # Gtkdialog box for the mount command. Part of SliTaz tools.
     1.6  #
     1.7 -VERSION=20100328
     1.8 +VERSION=20100401
     1.9  
    1.10  # Check if user is root.
    1.11  check_root()
    1.12 @@ -405,7 +405,7 @@
    1.13  	floppysetcat $@ | split -b 1440k /dev/stdin floppy$$
    1.14  	i=1
    1.15  	ls floppy$$* | while read file ; do
    1.16 -		output=floppy.$(printf "%03d" $i)
    1.17 +		output=$(printf "fd%03d.img" $i)
    1.18  		cat $file /dev/zero | dd bs=1k count=1440 of=$output conv=sync 2> /dev/null
    1.19  		rm -f $file
    1.20  		i=$(( $i + 1 ))
    1.21 @@ -541,7 +541,7 @@
    1.22  		[ -d $i ] || continue
    1.23  		j=0
    1.24  		for f in $i/floppy* ; do
    1.25 -			mv $f $(printf "floppy.%03d" $(( $base + $j )) )
    1.26 +			mv $f $(printf "fd%03d.img" $(( $base + $j )) )
    1.27  			j=$(($j + 1))
    1.28  		done
    1.29  		base=$(($base + 100))
    1.30 @@ -555,7 +555,7 @@
    1.31  dialogwritefloppyset()
    1.32  {
    1.33  	if ! list_floppy check; then
    1.34 -		du -h floppy.???
    1.35 +		du -h fd???.img
    1.36  		return
    1.37  	fi
    1.38  	while true; do
    1.39 @@ -566,7 +566,7 @@
    1.40      Insert a blank floppy in drive and
    1.41  select the floppy image you what to write.
    1.42  " 18 46 46 \
    1.43 -		$(on="on"; for i in floppy*; do echo "$i $(du -h $i | cut -f1) $on "; on="off"; done) 2>&1 1>&3`
    1.44 +		$(on="on"; for i in fd???.img; do echo "$i $(du -h $i | cut -f1) $on "; on="off"; done) 2>&1 1>&3`
    1.45  	retval=$?
    1.46  	exec 3>&-
    1.47  	check_retval
    1.48 @@ -689,7 +689,7 @@
    1.49        <button>
    1.50          <input file icon="forward"></input>
    1.51          <label>Create image set from ISO boot</label>
    1.52 -	<action>cd $OUTPUTDIR; bootfloppybox call mkisofloppiesxterm $ISO</action>
    1.53 +	<action>cd $FILE_DIRECTORY; bootfloppybox call mkisofloppiesxterm $ISO</action>
    1.54          <action type="closewindow">IMAGE_SET</action>
    1.55        </button>
    1.56      </hbox>
    1.57 @@ -759,7 +759,7 @@
    1.58        <button>
    1.59          <input file icon="forward"></input>
    1.60          <label>Create image set</label>
    1.61 -	<action>cd $OUTPUTDIR; bootfloppybox call mkfloppies $KERNEL $INITRD $CMDLINE</action>
    1.62 +	<action>cd $OUTPUT_DIRECTORY; bootfloppybox call mkfloppies $KERNEL $INITRD $CMDLINE</action>
    1.63          <action type="closewindow">IMAGE_SET</action>
    1.64        </button>
    1.65      </hbox>
    1.66 @@ -861,7 +861,7 @@
    1.67      <tree>
    1.68          <width>50</width><height>140</height>
    1.69      	<label>Size|File</label>
    1.70 -    	<input>du -h floppy.??? | sed "s/\t/|/" </input>
    1.71 +    	<input>du -h fd???.img | sed "s/\t/|/" </input>
    1.72      </tree>
    1.73      <hbox>
    1.74  '
    1.75 @@ -915,7 +915,7 @@
    1.76  	mkfloppies)
    1.77  		shift 2
    1.78  		floppyset $@
    1.79 -		sz=$(cat floppy.* | wc -c)
    1.80 +		sz=$(cat fd???.img | wc -c)
    1.81  		if [ -n "$XAUTHORITY" ]; then
    1.82  			gtkdialogshowfloppyset $sz
    1.83  		else