wok diff linux/receipt @ rev 18730
Quote root dir in post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Dec 20 15:13:45 2015 +0100 (2015-12-20) |
parents | 1067bb7f1e24 |
children | d6ca18366f41 |
line diff
1.1 --- a/linux/receipt Wed Dec 16 15:49:50 2015 +0100 1.2 +++ b/linux/receipt Sun Dec 20 15:13:45 2015 +0100 1.3 @@ -412,25 +412,25 @@ 1.4 grub_part="$(( $(echo $root_dev | grep -o '[0-9]*$')-1 ))" 1.5 # Use device.map to find grub device number 1.6 grub_dev="$(grep $(echo $root_dev | grep -o '^/dev/.d.' ) \ 1.7 - $1/boot/grub/device.map | cut -f1 | sed "s/)$/.$grub_part)/g")" 1.8 + "$1/boot/grub/device.map" | cut -f1 | sed "s/)$/.$grub_part)/g")" 1.9 1.10 # Add and clean kernel entries in case of upgrade for installed system. 1.11 - if ! grep -q vmlinuz-$VERSION-slitaz $1/boot/grub/menu.lst; then 1.12 + if ! grep -q vmlinuz-$VERSION-slitaz "$1/boot/grub/menu.lst"; then 1.13 1.14 # Clean the old entry 1.15 # TODO: old vmlinuz file is removed but the entry is still there. 1.16 # So grub error:15 when selected: http://bugs.slitaz.org/?id=74 1.17 1.18 # Add the new entry 1.19 - cat >> $1/boot/grub/menu.lst << EOT 1.20 + cat >> "$1/boot/grub/menu.lst" << EOT 1.21 1.22 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) 1.23 $grub_dev 1.24 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev quiet 1.25 EOT 1.26 # Make it the default entry 1.27 - last_entry=$(( $(grep -c '^title' $1/boot/grub/menu.lst)-1 )) 1.28 - sed -e "s/^default.*/default $last_entry/g" -i $1/boot/grub/menu.lst 1.29 + last_entry=$(( $(grep -c '^title' "$1/boot/grub/menu.lst")-1 )) 1.30 + sed -e "s/^default.*/default $last_entry/g" -i "$1/boot/grub/menu.lst" 1.31 fi 1.32 1.33 # Display information message.