slitaz-arm rev 201

tazdebian: postinst -> postrm
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Nov 18 16:46:32 2014 +0100 (2014-11-18)
parents f52ce3fe729d
children b057e6fb59e8
files rpi/tazbian
line diff
     1.1 --- a/rpi/tazbian	Tue Nov 18 13:40:01 2014 +0100
     1.2 +++ b/rpi/tazbian	Tue Nov 18 16:46:32 2014 +0100
     1.3 @@ -42,6 +42,9 @@
     1.4  
     1.5  # update base package
     1.6  BASE=$(ls -d slitaz-rpi-base-*/rootfs)
     1.7 +LIVE=$(ls -d slitaz-rpi-desktop-*/rootfs)
     1.8 +[ ! -d "$LIVE" ] && echo "Abort ($LIVE) !" && exit 1
     1.9 +LIVESZ=$(du -ks $LIVE | cut -f1)
    1.10  [ ! -d "$BASE" ] && echo "Abort ($BASE) !" && exit 1
    1.11  wget http://hg.slitaz.org/slitaz-arm/raw-file/tip/rpi/piboot
    1.12  wget http://hg.slitaz.org/slitaz-boot-scripts/raw-file/tip/init
    1.13 @@ -52,7 +55,7 @@
    1.14  mknod -m 660 $BASE/dev/mmcblk0 b 179 0
    1.15  mknod -m 660 $BASE/dev/mmcblk0p1 b 179 1
    1.16  mknod -m 660 $BASE/dev/mmcblk0p2 b 179 2
    1.17 -sed -i 's/.*mmcblk0p[2-9].*/# &/;s/noatime/noauto,/' $BASE/etc/fstab
    1.18 +sed -i 's/.*mmcblk0p[2-9].*/# &/;s/noatime/noauto,&/' $BASE/etc/fstab $LIVE/etc/fstab
    1.19  wget http://cook.slitaz.org/cross/arm/packages/packages.list
    1.20  while read file pkg extra ; do
    1.21  	[ -s boot$file ] && continue
    1.22 @@ -79,9 +82,6 @@
    1.23  EOT
    1.24  
    1.25  # deduplicate base & live
    1.26 -LIVE=$(ls -d slitaz-rpi-desktop-*/rootfs)
    1.27 -[ ! -d "$LIVE" ] && echo "Abort ($LIVE) !" && exit 1
    1.28 -LIVESZ=$(du -ks $LIVE | cut -f1)
    1.29  ( cd $BASE/ ; find ! -type d ) | while read file; do
    1.30  	if [ -L $BASE/$file ]; then
    1.31  		[ -L $LIVE/$file ] &&
    1.32 @@ -153,7 +153,7 @@
    1.33  tmpfs	/mnt/raspbian/$DESTDIR	tmpfs	size=0	0	0
    1.34  EOM
    1.35  fi
    1.36 -cd -
    1.37 +cd - > /dev/null
    1.38  
    1.39  if [ ! -f /boot/menu.txt ]; then
    1.40  
    1.41 @@ -191,27 +191,27 @@
    1.42  
    1.43  fi
    1.44  
    1.45 -echo "The SliTaz boot menu is available for next (re)boot."
    1.46 +echo "The SliTaz boot menu is available for the next (re)boot."
    1.47  
    1.48  exit 0
    1.49  EOT
    1.50 -cat > postrm <<EOT
    1.51 +cat > prerm <<EOT
    1.52  #!/bin/sh
    1.53  
    1.54  purge()
    1.55  {
    1.56 -	echo "Remove /$DESTDIR /boot/slitaz* trees..."
    1.57 +	echo "Remove /$DESTDIR & /boot/slitaz* trees..."
    1.58  	rm -rf /$DESTDIR /boot/slitaz*
    1.59  }
    1.60  
    1.61  disable()
    1.62  {
    1.63 -	if [ -d /boot/rasbian ]; then
    1.64 -		echo "Restore rasbian boot files..."
    1.65 -		mv -f /boot/rasbian/* /boot
    1.66 -		rm -rf /boot/rasbian
    1.67 +	if [ -d /boot/raspbian ]; then
    1.68 +		echo "Restore raspbian boot files..."
    1.69 +		rm -f /boot/raspbian/menu.txt
    1.70 +		mv -f /boot/raspbian/* /boot
    1.71  	fi
    1.72 -	rm -f /boot/menu.txt
    1.73 +	rm -f /boot/menu.txt /boot/slitaz*/cmdline.txt
    1.74  }
    1.75  
    1.76  case "\$1" in
    1.77 @@ -223,12 +223,12 @@
    1.78  	disable
    1.79  	;;
    1.80  *)
    1.81 -	echo "postrm called with unknown argument \\\`\$1'" >&2
    1.82 +	echo "prerm called with unknown argument \\\`\$1'" >&2
    1.83  	exit 0
    1.84  esac
    1.85  EOT
    1.86 -chmod +x postinst postrm
    1.87 -tar czf control.tar.gz md5sums control postinst postrm
    1.88 +chmod +x postinst prerm
    1.89 +tar czf control.tar.gz md5sums control postinst prerm
    1.90  rm -rf fs/$DESTDIR/*
    1.91  cd fs ; tar czf ../data.tar.gz . ; cd ..
    1.92  [ -x /usr/bin/ar ] || tazpkg get-install binutils