Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 26 lines (19 sloc) 397 Bytes
#!/bin/sh
MNT=/tmp/mnt-$UUID
case "$1" in
create)
mkfs.xfs $DEVICE && exec $0 open
;;
open)
mkfs.xfs $DEVICE 2> /dev/null # will fail if already formatted
mkdir -p $MNT &&
mount -osync $DEVICE $MNT &&
rsync --chown=root:root -av --delete tmp/ $MNT
kill -1 $PID
;;
close)
echo unmounting $MNT
umount -f $MNT && rm -rf $MNT
kill -2 $PID
;;
esac
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.