This file is indexed.

/usr/share/tcos/scripts/tcos-premount/36squashfs-methods is in initramfs-tools-tcos 0.89.93ubuntu2.

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
#!/bin/sh
# 
if [ "$1" = "prereqs" ]; then
  exit 0
fi


. /scripts/functions
. /conf/tcos.conf
. /conf/tcos-run-functions

quiet=n

# if break=nfs-squashfs STOP here
maybe_break nfs-squashfs



# if use NFS try to mount:
#
#   SERVER_IP:/var/lib/tcos/fs-$(uname -r)
#





# SQUASHFS NFS ?
SQUASHFS_MODE=$(read_cmdline_var "squashfs" "")


if [ "${SQUASHFS_MODE}" = "nfs" ]; then

  MNTOPT="ro,nolock,rsize=2048,wsize=2048,retrans=10"
  NFS_RO=/mnt/nfs-squashfs
  mkdir -p $NFS_RO

  log_begin_msg "Trying to mount NFS-SQUAHSFS"
    nfsmount -o $MNTOPT $(read_server "nfs-server"):${TCOS_VAR}/tftp ${NFS_RO} 2>/dev/null


  # try again
  if [ $? -ne 0 ]; then
    log_begin_msg "Second retry to mount NFS-SQUAHFS"
       nfsmount -o $MNTOPT $(read_server "nfs-server"):${TCOS_VAR}/tftp ${NFS_RO} 2> /dev/null
  fi

  if [ $? -ne 0 ]; then
    panic "Unable to mount NFS, check NFS service in server and ${TCOS_VAR}/tftp dir"
  fi

  log_end_msg 0

  # copy squashfs file in /mnt/tmp to not download
  log_begin_msg "Copy SQUASHFS to /mnt/tmp"
    cp ${NFS_RO}/usr-$(uname -r).squashfs /mnt/tmp/usr-$(uname -r).squashfs
  log_end_msg 0

  umount ${NFS_RO}

elif [ "${SQUASHFS_MODE}" = "http" ]; then


  log_begin_msg "Downloading SQUASHFS using HTTP"
    wget http://$(read_server "nfs-server"):8080/usr-$(uname -r).squashfs -O- > /mnt/tmp/usr-$(uname -r).squashfs
  log_end_msg 0


fi # end of SQUASHFS_MODE





exit 0