slitaz-boot-scripts rev 155

move mount-packages from rcS to bootopts.sh
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 22 21:57:26 2009 +0200 (2009-04-22)
parents 1392ada2e985
children 3f862c04d344
files etc/init.d/bootopts.sh etc/init.d/rcS
line diff
     1.1 --- a/etc/init.d/bootopts.sh	Tue Apr 21 11:01:37 2009 +0200
     1.2 +++ b/etc/init.d/bootopts.sh	Wed Apr 22 21:57:26 2009 +0200
     1.3 @@ -207,3 +207,17 @@
     1.4  if grep -q "mount" /proc/cmdline; then
     1.5  	mount_partitions
     1.6  fi
     1.7 +
     1.8 +# Mount and install packages-XXX.iso (usefull without Internet connection)
     1.9 +if grep -q " mount-packages" /proc/cmdline; then
    1.10 +	PKGSIGN="LABEL=\"packages-$(cat /etc/slitaz-release)\" TYPE=\"iso9660\""
    1.11 +	PKGDEV=$(blkid | grep "$PKGSIGN" | cut -d: -f1)
    1.12 +	[ -z "$PKGDEV" -a -L /dev/cdrom ] && PKGDEV=$(blkid /dev/cdrom | grep "$PKGSIGN" | cut -d: -f1)
    1.13 +	if [ -n "$PKGDEV" ]; then
    1.14 +		echo -n "Mounting packages archive from $PKGDEV..."
    1.15 +		mkdir /packages && mount -t iso9660 -o ro $PKGDEV /packages
    1.16 +		status
    1.17 +		/packages/install.sh
    1.18 +	fi
    1.19 +fi
    1.20 +
     2.1 --- a/etc/init.d/rcS	Tue Apr 21 11:01:37 2009 +0200
     2.2 +++ b/etc/init.d/rcS	Wed Apr 22 21:57:26 2009 +0200
     2.3 @@ -198,19 +198,6 @@
     2.4  # Back to a verbose mode.
     2.5  echo "7 4 1 7" > /proc/sys/kernel/printk
     2.6  
     2.7 -# Mount and install packages-XXX.iso (usefull without Internet connection)
     2.8 -if grep -q " mount-packages" /proc/cmdline; then
     2.9 -	PKGSIGN="LABEL=\"packages-$(cat /etc/slitaz-release)\" TYPE=\"iso9660\""
    2.10 -	PKGDEV=$(blkid | grep "$PKGSIGN" | cut -d: -f1)
    2.11 -	[ -z "$PKGDEV" -a -L /dev/cdrom ] && PKGDEV=$(blkid /dev/cdrom | grep "$PKGSIGN" | cut -d: -f1)
    2.12 -	if [ -n "$PKGDEV" ]; then
    2.13 -		echo -n "Mounting packages archive from $PKGDEV..."
    2.14 -		mkdir /packages && mount -t iso9660 -o ro $PKGDEV /packages
    2.15 -		status
    2.16 -		/packages/install.sh
    2.17 -	fi
    2.18 -fi
    2.19 -
    2.20  # Reset screen and display a bold message.
    2.21  if [ -n "$MESSAGE" ]; then
    2.22  	/usr/bin/reset