mirror of
https://github.com/FOGProject/fos.git
synced 2026-04-19 15:29:30 -05:00
Add flock call for exclusive access as it seems to fail otherwise.
This commit is contained in:
@@ -91,7 +91,7 @@ restoreSfdiskPartitions() {
|
||||
[[ -z $disk ]] && handleError "No disk passed (${FUNCNAME[0]})\n Args Passed: $*"
|
||||
[[ -z $file ]] && handleError "No file to receive from passed (${FUNCNAME[0]})\n Args Passed: $*"
|
||||
applySfdiskPartitions "$disk" "$file"
|
||||
fdisk $disk < /usr/share/fog/lib/EOFRESTOREPART >/dev/null 2>&1
|
||||
flock $disk fdisk $disk < /usr/share/fog/lib/EOFRESTOREPART >/dev/null 2>&1
|
||||
[[ ! $? -eq 0 ]] && majorDebugEcho "fdisk failed in (${FUNCNAME[0]})"
|
||||
}
|
||||
# $1 is the name of the disk drive
|
||||
|
||||
Reference in New Issue
Block a user