mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
partition: use udevadm wait
This commit is contained in:
parent
c189d3bd78
commit
9b264c1dfa
45
meson.build
45
meson.build
@ -3076,27 +3076,6 @@ if conf.get('ENABLE_BINFMT') == 1
|
||||
endif
|
||||
endif
|
||||
|
||||
if conf.get('ENABLE_REPART') == 1
|
||||
exe = executable(
|
||||
'systemd-repart',
|
||||
systemd_repart_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
dependencies : [threads,
|
||||
libblkid,
|
||||
libfdisk],
|
||||
install_rpath : rootlibexecdir,
|
||||
install : true,
|
||||
install_dir : rootbindir)
|
||||
public_programs += exe
|
||||
|
||||
if want_tests != 'false'
|
||||
test('test-repart',
|
||||
test_repart_sh,
|
||||
args : exe.full_path())
|
||||
endif
|
||||
endif
|
||||
|
||||
if conf.get('ENABLE_SYSUPDATE') == 1
|
||||
exe = executable(
|
||||
'systemd-sysupdate',
|
||||
@ -3517,7 +3496,7 @@ public_programs += executable(
|
||||
install : true,
|
||||
install_dir : rootlibexecdir)
|
||||
|
||||
public_programs += executable(
|
||||
udevadm = executable(
|
||||
'udevadm',
|
||||
udevadm_sources,
|
||||
include_directories : includes,
|
||||
@ -3531,6 +3510,28 @@ public_programs += executable(
|
||||
install_rpath : udev_rpath,
|
||||
install : true,
|
||||
install_dir : rootbindir)
|
||||
public_programs += udevadm
|
||||
|
||||
if conf.get('ENABLE_REPART') == 1
|
||||
exe = executable(
|
||||
'systemd-repart',
|
||||
systemd_repart_sources,
|
||||
include_directories : includes,
|
||||
link_with : [libshared],
|
||||
dependencies : [threads,
|
||||
libblkid,
|
||||
libfdisk],
|
||||
install_rpath : rootlibexecdir,
|
||||
install : true,
|
||||
install_dir : rootbindir)
|
||||
public_programs += exe
|
||||
|
||||
if want_tests != 'false'
|
||||
test('test-repart',
|
||||
test_repart_sh,
|
||||
args : [exe.full_path(), udevadm.full_path()])
|
||||
endif
|
||||
endif
|
||||
|
||||
executable(
|
||||
'systemd-shutdown',
|
||||
|
@ -6,7 +6,9 @@ set -o pipefail
|
||||
[[ -e /dev/loop-control ]] || exit 77
|
||||
|
||||
repart="${1:?}"
|
||||
udevadm="${2:?}"
|
||||
test -x "$repart"
|
||||
test -x "$udevadm"
|
||||
|
||||
PATH=$PATH:/sbin:/usr/sbin
|
||||
|
||||
@ -199,10 +201,7 @@ $D/zzz7 : start= 6291416, size= 98304, type=0FC63DAF-8483-4772-8E79-3D
|
||||
EOF
|
||||
|
||||
LOOP="$(losetup -P --show --find "$D/zzz")"
|
||||
while : ; do
|
||||
test -e "$LOOP" && break
|
||||
sleep .2
|
||||
done
|
||||
"${udevadm:?}" wait --timeout 60 --initialized=yes --settle "${LOOP:?}"
|
||||
|
||||
VOLUME="test-repart-$RANDOM"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user