/sbin/umount.ploop is in ploop 1.10-2.
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 | #!/bin/sh
#
# Usage:
# /sbin/umount.ploop [-h] mount_point
#
# (c) 2012. Parallels IP Holdings GmbH. All rights reserved.
#
PLOOP="ploop"
MOUNT_POINT=""
PLOOP_DEV=""
MTAB="/etc/mtab"
DESCRIPTOR="DiskDescriptor.xml"
# Make sure we have sane PATH
for P in /sbin /usr/sbin /usr/local/sbin; do
if ! echo ":${PATH}:" | fgrep -q ":${P}:"; then
PATH="$P:$PATH"
fi
done
export PATH
if ! which $PLOOP >/dev/null; then
echo "$PLOOP utility is not found"
exit 2
fi
case $1 in
-h|--help|-?)
echo "umount.ploop is a private mount(8) wrapper for ploop."
echo "Don't use it directly!"
exit 1
;;
esac
# Parse the parameters. umount always call us with canonicalized mpoint
if [ "x$1" = "x" ]; then
echo "ploop-related mount point was not given"
exit 32
else
MOUNT_POINT=$1
fi
# Call the ploop utility
$PLOOP umount -m $MOUNT_POINT
if [ $? -ne 0 ]; then
echo "$PLOOP umount -m $MOUNT_POINT failed"
exit 32
fi
# Clear /etc/mtab
if [ -f $MTAB ]; then
sed -i "\;^[a-zA-Z0-9/\.]*/$DESCRIPTOR $MOUNT_POINT ploop ;d" $MTAB
if [ $? -ne 0 ]; then
echo "Failed to save $MTAB"
exit 32
fi
fi
exit 0
|