This file is indexed.

/etc/tcos/hooks/tcosmain 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
#!/bin/bash

# new header not using prereqs
if [ "$1" = "prereqs" ]; then
  echo ""
  exit 0
fi



. /usr/share/initramfs-tools/hook-functions
. /usr/share/initramfs-tools/scripts/functions

. $CONFDIR/initramfs.conf

# read from env vars TCOS_BOOT
TCOS_BOOT=$(env| awk -F "=" '/^TCOS_BOOT=/ {print $2}')
if [ "${TCOS_BOOT}" != "" ]; then
  BOOT=$TCOS_BOOT
fi

if [ "${BOOT}" = "tcos" -o "${BOOT}" = "tcos-nfs" ]; then

. $CONFDIR/tcos.conf
. $TCOS_DIR/tcos-generation-functions.sh

  #for tpl in $(tcos_get_templates); do
  #  _verbose "(tcosmain) loading template $(basename $tpl)"
  #  . $tpl
  #done

  # load forced settings for derivatives
  if [ -d $CONFDIR/conf.d/ ]; then
    for file in $CONFDIR/conf.d/tcos*conf; do
      [ -e $file ] && . $file
    done
  fi

  # copy scripts into image
  cp -ra ${TCOS_DIR}/scripts/* ${DESTDIR}/scripts/

  run_scripts ${TCOS_DIR}/hooks
fi