summaryrefslogtreecommitdiff
path: root/src/libs6rc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-09-12 01:23:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-09-12 01:23:04 +0000
commit930c7fbcc1c236328d0875f857c9ae03d5ad03ec (patch)
tree5b6be43bea1ddcb30135ff78df9beaa076218dd8 /src/libs6rc
parent716dde0b12532bb814c3cc8fedd99b8d16b3cf07 (diff)
downloads6-rc-930c7fbcc1c236328d0875f857c9ae03d5ad03ec.tar.xz
s6-rc-update bugfixes. Now works on nops.
Diffstat (limited to 'src/libs6rc')
-rw-r--r--src/libs6rc/s6rc_servicedir_copy_online.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libs6rc/s6rc_servicedir_copy_online.c b/src/libs6rc/s6rc_servicedir_copy_online.c
index 6e14844..76d9e10 100644
--- a/src/libs6rc/s6rc_servicedir_copy_online.c
+++ b/src/libs6rc/s6rc_servicedir_copy_online.c
@@ -36,7 +36,12 @@ int s6rc_servicedir_copy_online (char const *src, char const *dst)
{
str_copy(dstfn + dstlen + 1, s6rc_servicedir_file_list[i].name) ;
str_copy(oldfn + dstlen + 5, s6rc_servicedir_file_list[i].name) ;
- if (rename(dstfn, oldfn) < 0) { e = errno ; goto errrename ; }
+ if (rename(dstfn, oldfn) < 0
+ && (errno != ENOENT || s6rc_servicedir_file_list[i].options & SVFILE_MANDATORY))
+ {
+ e = errno ;
+ goto errrename ;
+ }
}
n = i ;
while (i--)