mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
core: do not fail if ignorable img.v/ vpick dir is missing
Do not fail if the directory is missing entirely, other than just empty Follow-up for00f546e25e
Follow-up for5e79dd96a8
Follow-up for622efc544d
(cherry picked from commite1efa9d804
)
This commit is contained in:
parent
2494dc1961
commit
d2c8426a59
@ -511,6 +511,8 @@ static int append_extensions(
|
||||
&pick_filter_image_raw,
|
||||
PICK_ARCHITECTURE|PICK_TRIES,
|
||||
&result);
|
||||
if (r == -ENOENT && m->ignore_enoent)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (!result.path) {
|
||||
@ -574,6 +576,8 @@ static int append_extensions(
|
||||
&pick_filter_image_dir,
|
||||
PICK_ARCHITECTURE|PICK_TRIES,
|
||||
&result);
|
||||
if (r == -ENOENT && ignore_enoent)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (!result.path) {
|
||||
|
@ -444,12 +444,13 @@ systemctl is-active testservice-50e.service
|
||||
VBASE="vtest$RANDOM"
|
||||
VDIR="/tmp/$VBASE.v"
|
||||
EMPTY_VDIR="/tmp/$VBASE-empty.v"
|
||||
NONEXISTENT_VDIR="/tmp/$VBASE-nonexistent.v"
|
||||
mkdir "$VDIR" "$EMPTY_VDIR"
|
||||
|
||||
ln -s /tmp/app0.raw "$VDIR/${VBASE}_0.raw"
|
||||
ln -s /tmp/app1.raw "$VDIR/${VBASE}_1.raw"
|
||||
|
||||
systemd-run -P -p ExtensionImages="$VDIR -$EMPTY_VDIR" bash -c '/opt/script1.sh | grep ID'
|
||||
systemd-run -P -p ExtensionImages="$VDIR -$EMPTY_VDIR -$NONEXISTENT_VDIR" bash -c '/opt/script1.sh | grep ID'
|
||||
|
||||
rm -rf "$VDIR" "$EMPTY_VDIR"
|
||||
|
||||
@ -531,12 +532,13 @@ systemctl is-active testservice-50f.service
|
||||
VBASE="vtest$RANDOM"
|
||||
VDIR="/tmp/$VBASE.v"
|
||||
EMPTY_VDIR="/tmp/$VBASE-empty.v"
|
||||
NONEXISTENT_VDIR="/tmp/$VBASE-nonexistent.v"
|
||||
mkdir "$VDIR" "$EMPTY_VDIR"
|
||||
|
||||
ln -s "$IMAGE_DIR/app0" "$VDIR/${VBASE}_0"
|
||||
ln -s "$IMAGE_DIR/app1" "$VDIR/${VBASE}_1"
|
||||
|
||||
systemd-run -P --property ExtensionDirectories="$VDIR -$EMPTY_VDIR" cat /opt/script1.sh | grep -q -F "extension-release.app2"
|
||||
systemd-run -P --property ExtensionDirectories="$VDIR -$EMPTY_VDIR -$NONEXISTENT_VDIR" cat /opt/script1.sh | grep -q -F "extension-release.app2"
|
||||
|
||||
rm -rf "$VDIR" "$EMPTY_VDIR"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user