Merge remote-tracking branch 'qubesos/pr/5'
* qubesos/pr/5: fix VM autostart race condition Fixes qubesos/qubes-issues#1075 Conflicts: linux/aux-tools/prepare-volatile-img.sh
This commit is contained in:
parent
a425873e73
commit
d27d22a3cf
@ -31,6 +31,8 @@ sfdisk --no-reread -u M "$FILENAME" > /dev/null 2> /dev/null <<EOF
|
|||||||
,${ROOT_SIZE},L
|
,${ROOT_SIZE},L
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
(
|
||||||
|
flock 200
|
||||||
loopdev=`losetup -f --show --partscan "$FILENAME"`
|
loopdev=`losetup -f --show --partscan "$FILENAME"`
|
||||||
udevadm settle
|
udevadm settle
|
||||||
created=
|
created=
|
||||||
@ -48,3 +50,4 @@ if [ "$created" = "yes" ]; then
|
|||||||
fi
|
fi
|
||||||
losetup -d ${loopdev} || :
|
losetup -d ${loopdev} || :
|
||||||
chown --reference `dirname "$FILENAME"` "$FILENAME"
|
chown --reference `dirname "$FILENAME"` "$FILENAME"
|
||||||
|
) 200>"/var/run/qubes/prepare-volatile-img.lock"
|
||||||
|
Loading…
Reference in New Issue
Block a user