slitaz-boot-scripts rev 154
Add mount-packages in rcS
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Apr 21 11:01:37 2009 +0200 (2009-04-21) |
parents | ae0a8f86229a |
children | 965cc9d8722a |
files | etc/init.d/rcS |
line diff
1.1 --- a/etc/init.d/rcS Tue Apr 21 01:46:21 2009 +0200 1.2 +++ b/etc/init.d/rcS Tue Apr 21 11:01:37 2009 +0200 1.3 @@ -198,6 +198,19 @@ 1.4 # Back to a verbose mode. 1.5 echo "7 4 1 7" > /proc/sys/kernel/printk 1.6 1.7 +# Mount and install packages-XXX.iso (usefull without Internet connection) 1.8 +if grep -q " mount-packages" /proc/cmdline; then 1.9 + PKGSIGN="LABEL=\"packages-$(cat /etc/slitaz-release)\" TYPE=\"iso9660\"" 1.10 + PKGDEV=$(blkid | grep "$PKGSIGN" | cut -d: -f1) 1.11 + [ -z "$PKGDEV" -a -L /dev/cdrom ] && PKGDEV=$(blkid /dev/cdrom | grep "$PKGSIGN" | cut -d: -f1) 1.12 + if [ -n "$PKGDEV" ]; then 1.13 + echo -n "Mounting packages archive from $PKGDEV..." 1.14 + mkdir /packages && mount -t iso9660 -o ro $PKGDEV /packages 1.15 + status 1.16 + /packages/install.sh 1.17 + fi 1.18 +fi 1.19 + 1.20 # Reset screen and display a bold message. 1.21 if [ -n "$MESSAGE" ]; then 1.22 /usr/bin/reset