mirror of
https://github.com/systemd/systemd.git
synced 2024-12-26 03:22:00 +03:00
system-update-generator: accept a dangling symlink
The offline update mechanism is explicitly designed to work with a separate /var. systemd-update-generator is supposed to run early, before filesystems are mounted, so it cannot check if the /system-update symlink actually points to anything. The update is run *after* filesystems are mounted, so it should be able to access the target of the symlink without trouble. https://bugzilla.redhat.com/show_bug.cgi?id=1178978
This commit is contained in:
parent
7fd68245a1
commit
6b321a7901
Notes:
Lennart Poettering
2015-01-29 03:00:12 +01:00
Backport: bugfix
@ -37,7 +37,7 @@ static const char *arg_dest = "/tmp";
|
|||||||
static int generate_symlink(void) {
|
static int generate_symlink(void) {
|
||||||
const char *p = NULL;
|
const char *p = NULL;
|
||||||
|
|
||||||
if (access("/system-update", F_OK) < 0) {
|
if (laccess("/system-update", F_OK) < 0) {
|
||||||
if (errno == ENOENT)
|
if (errno == ENOENT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user