diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-08-16 15:37:52 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-16 15:37:52 +0200 |
commit | f61448083198dc0e4e0d19a916bcd478336cc85d (patch) | |
tree | e9325f22f715d5788b46e5ecbeb6e2fc94a73010 /src/util.c | |
parent | 6e200d55ae538fc29360cdaa9863f30cdddf58f3 (diff) |
systemctl: add support for delayed shutdown, similar to sysv in style
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c index c0b63dd574..bc227f52d5 100644 --- a/src/util.c +++ b/src/util.c @@ -2997,6 +2997,17 @@ void nss_disable_nscd(void) { log_debug("Cannot disable nscd."); } +int touch(const char *path) { + int fd; + + assert(path); + + if ((fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0666)) < 0) + return -errno; + + close_nointr_nofail(fd); + return 0; +} static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", |