mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-03 18:43:50 +08:00
copr-builders: enable-swap.sh: wait until the swap partition exists
This commit is contained in:
@@ -88,7 +88,12 @@ mkdir /var/lib/copr-rpmbuild/workspace
|
||||
rpm --setperms copr-rpmbuild || :
|
||||
rpm --setugids copr-rpmbuild || :
|
||||
|
||||
# Wait till the partition appears
|
||||
partprobe || :
|
||||
partition=${swap_device}${part_suffix}2
|
||||
while ! test -e "$partition"; do
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
mkswap "${swap_device}${part_suffix}2"
|
||||
swapon "${swap_device}${part_suffix}2"
|
||||
mkswap "$partition"
|
||||
swapon "$partition"
|
||||
|
||||
Reference in New Issue
Block a user