#!/bin/sh # if [ "$1" = "prereqs" ]; then exit 0 fi quiet=n . /scripts/functions # if break=sqmount STOP here maybe_break sqmount . /conf/tcos.conf . /conf/tcos-run-functions TCOS_SQUASHFS=$(read_cmdline_var "squashfs" "${TCOS_SQUASHFS}") if [ ! -z $TCOS_DISABLE_SQUASHFS ]; then _log "SQMOUNT no squashfs support, exiting" # no squashfs support defined exit 0 fi USR_SQUASH=/mnt/tmp/usr-$(uname -r).squashfs MOD_SQUASH=/mnt/tmp/allmodules-$(uname -r).squashfs # check if have in /mnt/tmp without version if [ -e /mnt/tmp/usr.squashfs ]; then USR_SQUASH=/mnt/tmp/usr.squashfs fi if [ -e /mnt/tmp/allmodules.squashfs ]; then MOD_SQUASH=/mnt/tmp/allmodules.squashfs fi ############################################## if [ ! -e /dev/loop0 ] && [ ! -e /dev/loop1 ]; then for NUM in $(seq 0 8) ; do mknod /dev/loop$NUM b 7 $NUM done fi # Mount squashfs filesystems log_begin_msg "Mounting usr filesystem" mount -r -o loop -t squashfs ${USR_SQUASH} /usr >> /tmp/initramfs.debug 2>&1 # check if squashfs mount give an error if [ $? != 0 ]; then panic "Error mounting usr.squashfs check squashfs module or bugs" else log_end_msg 0 fi ############################################### # DOCUMENTME allmodules | download with tftp allmodules.squashfs to test what modules need thin client TCOS_ALL_MODULES_CMD=$(read_cmdline_var "allmodules" "0") if [ "$TCOS_ALL_MODULES_CMD" = "1" ] || [ ! -z $TCOS_ALL_MODULES_DOWNLOAD ]; then if [ -f ${MOD_SQUASH} ]; then log_begin_msg "Mounting allmodules.squashfs" mount -r -o loop -t squashfs ${MOD_SQUASH} /lib/modules/$(uname -r)/ >> /tmp/initramfs.debug 2>&1 log_end_msg $? fi fi update_progress exit 0