/usr/share/tcos/scripts/tcos-premount/45sqmount is in initramfs-tools-tcos 0.89.86.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | #!/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
exit 0
|