Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (21 sloc) 492 Bytes
#!/bin/sh
# example script for creating a VM or container image with debootstrap
#
# run with:
#
# $ sudo ./build/mindcastle debian.swap ./statechange-debootstrap.sh
echo $0 PID=$PID UUID=$UUID $1
MNT=/tmp/mnt-$UUID
case "$1" in
create)
mkfs.xfs $DEVICE && exec $0 open
;;
open)
(mkdir -p $MNT && mount -osync $DEVICE $MNT) || (rm -rf $MNT; kill -2 $PID)
debootstrap stable $MNT
kill -1 $PID
;;
close)
umount $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.