Compare commits
No commits in common. "6d81507a99286fee374881c02f78192f630cc17d" and "99be1f49afe75fdc6e0fc370b74fcda78c1f81ec" have entirely different histories.
6d81507a99
...
99be1f49af
15
bin/mkvm.sh
15
bin/mkvm.sh
|
@ -84,25 +84,18 @@ for fileIndex in ${!COPY[@]}; do
|
|||
#DESTPATH="$ROOTFS""$DESTPATH"
|
||||
PARENTPATHDEST="$(dirname "$PATHDEST")"
|
||||
mkdir -p "$PARENTPATHDEST"
|
||||
cp --dereference -r "$PATHSRC" "$PATHDEST"
|
||||
cp -r "$PATHSRC" "$PATHDEST"
|
||||
done
|
||||
|
||||
CMD="$1"
|
||||
shift
|
||||
|
||||
if [[ "$CMD" != "" ]]; then
|
||||
lxc-start -n "$VMNAME"
|
||||
lxc-attach -n "$VMNAME" -- "$CMD" "$@"
|
||||
if [ $KEEP -eq 0 ]; then
|
||||
lxc-stop --kill "$VMNAME"
|
||||
lxc-destroy -n "$VMNAME"
|
||||
fi
|
||||
lxc-execute -n "$VMNAME" -- "$CMD" "$@"
|
||||
[ $KEEP -eq 0 ] && lxc-destroy -n "$VMNAME"
|
||||
else
|
||||
lxc-start -n "$VMNAME"
|
||||
lxc-attach -n "$VMNAME" bash
|
||||
if [ $KEEP -eq 0 ]; then
|
||||
lxc-stop --kill "$VMNAME"
|
||||
lxc-destroy -n "$VMNAME"
|
||||
fi
|
||||
[ $KEEP -eq 0 ] && lxc-stop --kill "$VMNAME" && lxc-destroy -n "$VMNAME"
|
||||
fi
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ ExecStart=/usr/sbin/ramdisk.sh start
|
|||
ExecStop=/usr/sbin/ramdisk.sh stop
|
||||
Restart=on-failure
|
||||
RestartPreventExitStatus=255
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Reference in New Issue
Block a user