/usr/lib/xcp/bin/xe-mount-iso-sr is in xcp-xapi 1.3.2-5.
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 | #!/bin/bash
#
# Copyright (c) Citrix Systems 2008. All rights reserved.
#
set -e
usage () {
echo Usage: $0 host:/directory [mount options]
echo Create a shared SR which mounts a remote ISO repository.
exit 1
}
if [ -z "$1" ]; then
usage
else
LOCATION="$1"
fi
shift 1
OPTIONS=$*
XE="/usr/bin/xe"
UUID=$(uuidgen)
SR=$(${XE} sr-introduce name-label="Remote ISO Library on: ${LOCATION}" content-type=iso shared=true type=iso uuid=${UUID} physical-size=0)
${XE} sr-param-set other-config:auto-scan=true uuid=${UUID}
. /etc/xcp/inventory
PBD=$(${XE} pbd-create host-uuid=${INSTALLATION_UUID} sr-uuid=$SR device-config:location="${LOCATION}" device-config:options="${OPTIONS}")
destroy () {
xe pbd-destroy uuid=${PBD}
xe sr-forget uuid=${SR}
exit 1
}
xe pbd-plug uuid=${PBD} &>/dev/null || destroy
|