Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (23 sloc) 0.489 kB
#!/bin/sh
if [ ! -x /sbin/tcplay ]; then
return 1;
fi
FSTYPE=$2
MOUNTFROM=$3
VOLUME=$4
OPTIONS=$5
# Make sure that MOUNTFROM starts with /dev/
substr="${MOUNTFROM##/dev/}"
if [ "$substr" = "$MOUNTFROM" ]; then
MOUNTFROM="/dev/$MOUNTFROM"
fi
# Open crypto volume
/sbin/tcplay -m $VOLUME -d $MOUNTFROM $OPTIONS
if [ "$?" -ne "0" ]; then
return 2;
fi
# Mount, as is expected, onto /new_root
mount -o ro -t $FSTYPE /dev/mapper/$VOLUME /new_root
if [ "$?" -ne "0" ]; then
return 3;
fi
Jump to Line
Something went wrong with that request. Please try again.