This file is indexed.

/usr/share/xen-tools/common/90-make-fstab is in xen-tools 4.4-1.

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
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/bin/sh
#
#  This script is responsible for setting up /etc/fstab upon the
# new instance.
#
#  This should be a simple job, but it is complicated by some of the
# differences between filesystems - some root filesystems will require
# the installation of new packages, and we have to handle that here.
#
# Steve
# --
# http://www.steve.org.uk/


prefix=$1

#
#  Source our common functions
#
if [ -e /usr/share/xen-tools/common.sh ]; then
    . /usr/share/xen-tools/common.sh
else
    . ./hooks/common.sh
fi


#
# Log our start
#
logMessage Script $0 starting

logMessage Filesystem options are ${options}

#
# Find the root device.
#
#  1.  default to xvda.
#
#  2.  If --ide is specified use hda.
#
#  3.  If --scsi is specified use sda.
#
#  4.  Otherwise use a named $disk_device
#
device=xvda
if [ "${ide}" ]; then
    device=hda
elif [ "${scsi}" ]; then
    device=sda
else
    if [ -n "${disk_device}" ]; then
        device=`basename $disk_device`
    fi
fi

logMessage "Root device is /dev/$device"


#
#  Now we have the options we can create the fstab.
#
has_xfs=0
has_reiserfs=0
has_btrfs=0
cat <<E_O_FSTAB > ${prefix}/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
devpts          /dev/pts        devpts  rw,noexec,nosuid,gid=5,mode=620 0  0
E_O_FSTAB
for part in `seq 1 ${NUMPARTITIONS}`; do
    eval "PARTITION=\"\${PARTITION${part}}\""
    OLDIFS="${IFS}"
    IFS=:
    x=0
    for partdata in ${PARTITION}; do
        eval "partdata${x}=\"${partdata}\""
        x=$(( $x+1 ))
    done
    IFS="${OLDIFS}"

    case "${partdata2}" in
        xfs)
            has_xfs=1
            ;;
        reiserfs)
            has_reiserfs=1
            ;;
        btrfs)
            has_btrfs=1
            ;;
    esac

    if [ "${partdata2}" = "swap" ]; then
        echo "/dev/${device}${part} none swap sw 0 0" >> ${prefix}/etc/fstab
    else
        echo "/dev/${device}${part} ${partdata3} ${partdata2} ${partdata4} 0 1" >> ${prefix}/etc/fstab
    fi
done


logMessage Checking for filesystem tools to install

#
#  Install any required packages for the given root filesystem
#
if [ "$has_xfs" -eq 1 ]; then
    installPackage ${prefix} xfsprogs
fi
if [ "$has_reiserfs" -eq 1 ]; then
    if isAPT; then
        installDebianPackage reiserfsprogs
    elif isYum; then
        installRPMPackage reiserfs-utils
    else
        logMessage "Unable to install reiserfs tools; no package manager recognized"
    fi
fi
if [ "$has_btrfs" -eq 1 ]; then
    if isAPT; then
        installDebianPackage btrfs-tools
    elif isYum; then
        installRPMPackage btrfs-progs
    else
        logMessage "Unable to install btrfs tools; no package manager recognized"
    fi
fi


#
#  Log our finish
#
logMessage Script $0 finished