wok-next diff syslinux/stuff/iso2exe/init @ rev 14247

syslinux/iso2exe: use posixovl -F
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 24 23:14:15 2013 +0100 (2013-03-24)
parents b5ea41033c21
children 65b3fd0022ed
line diff
     1.1 --- a/syslinux/stuff/iso2exe/init	Tue Feb 05 23:32:17 2013 +0100
     1.2 +++ b/syslinux/stuff/iso2exe/init	Sun Mar 24 23:14:15 2013 +0100
     1.3 @@ -99,7 +99,7 @@
     1.4  arg mount "Mount device"
     1.5  mount \$( (blkid /dev/?d* || blkid) | grep \$val | sed 's/:.*//;q') /mnt
     1.6  arg subroot "Change root to directory"
     1.7 -mount.posixovl /mnt/\$val
     1.8 +mount.posixovl -F /mnt/\$val
     1.9  mount --bind /mnt /mnt/\$val/mnt/dos
    1.10  LDSO=\$(ls /mnt/\$val/lib/ld-* | sed q)
    1.11  umount /proc
    1.12 @@ -119,7 +119,7 @@
    1.13  doinstall()
    1.14  {
    1.15  	mkdir /mnt/slitaz
    1.16 -	mount.posixovl /mnt/slitaz || return
    1.17 +	mount.posixovl -F /mnt/slitaz || return
    1.18  	mkdir -p /mnt/slitaz/boot /mnt/slitaz/mnt/dos
    1.19  	if [ -d /media/cdrom/fs ]; then
    1.20  		cp -a /media/cdrom/fs/. /mnt/slitaz
    1.21 @@ -146,16 +146,16 @@
    1.22  	umount -d /media/cdrom
    1.23  	gettazboot /mnt/slitaz/boot/tazboot.exe
    1.24  	mkinitrd /mnt/slitaz/boot/initrd
    1.25 -	cat > /mnt/slitaz/boot/tazboot.cmd <<EOT
    1.26 +	unix2dos > /mnt/slitaz/boot/tazboot.cmd <<EOT
    1.27  kernel=\\slitaz\\boot\\bzimage
    1.28  initrd=\\slitaz\\boot\\initrd
    1.29  rw root=/dev/null mount=$(getuuid) subroot=slitaz autologin
    1.30  EOT
    1.31  	unix2dos /mnt/slitaz/boot/he* /mnt/slitaz/boot/opt* \
    1.32 -		/mnt/slitaz/boot/README /mnt/slitaz/boot/tazboot.cmd
    1.33 +		/mnt/slitaz/boot/README
    1.34  	[ -x /mnt/slitaz/usr/sbin/mount.posixovl ] ||
    1.35  	cp $(which mount.posixovl) /mnt/slitaz/usr/sbin
    1.36 -	! grep -qs tazboot /mnt/boot.ini && cat >> /mnt/boot.ini <<EOT
    1.37 +	! grep -qs tazboot /mnt/boot.ini && unix2dos >> /mnt/boot.ini <<EOT
    1.38  C:\\slitaz\\boot\\tazboot.exe="SliTaz"
    1.39  EOT
    1.40  	grep -qs menuitem /mnt/config.sys && !grep -q tazboot /mnt/config.sys &&
    1.41 @@ -164,6 +164,7 @@
    1.42  [slitaz]
    1.43  device=\\slitaz\\boot\\tazboot.exe
    1.44  EOT
    1.45 +	unix2dos /mnt/config.sys
    1.46  }
    1.47  
    1.48  install()
    1.49 @@ -310,7 +311,7 @@
    1.50  to machine.\n\n
    1.51  Please plug your USB stick in now.\n 
    1.52  " 18 70
    1.53 -	[ $? -eq 0 ] || return
    1.54 +	[ $? -eq 0 -a -n "$(which tazusb)" ] || return
    1.55  	sleep 5
    1.56  	DEV="$(grep -l 1 /sys/block/*/removable | \
    1.57  		sed 's|/sys/block/\(.*\)/removable|\1|')"
    1.58 @@ -407,9 +408,9 @@
    1.59  	getty -n -l /bin/ash 38400 tty1 || sh
    1.60  }
    1.61  
    1.62 -[ -x /usr/sbin/mount.posixovl ] ||
    1.63 -mv /bin/mount.posixovl.iso2exe /usr/sbin/mount.posixovl 2> /dev/null ||
    1.64 -mv /bin/mount.posixovl.iso2exe /bin/mount.posixovl
    1.65 +BIN=bin/mount.posixovl
    1.66 +[ -x /usr/s$BIN ] || mv /bin/mount.posixovl.iso2exe \
    1.67 +/usr/s$BIN 2> /dev/null || mv /bin/mount.posixovl.iso2exe /$BIN
    1.68  mount -t proc /proc /proc
    1.69  ISO="$(getarg iso | sed 's/.://;s|\\|/|g')"
    1.70  getiso
    1.71 @@ -419,6 +420,7 @@
    1.72  *live*)		live ;;
    1.73  *text*)		text ;;
    1.74  esac
    1.75 +which $DIALOG || live
    1.76  dmesg > /tmp/dmesg
    1.77  
    1.78  while true; do