summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs6rc/s6rc_servicedir_internal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs6rc/s6rc_servicedir_internal.c b/src/libs6rc/s6rc_servicedir_internal.c
index 9c2e429..3735f2b 100644
--- a/src/libs6rc/s6rc_servicedir_internal.c
+++ b/src/libs6rc/s6rc_servicedir_internal.c
@@ -83,6 +83,11 @@ int s6rc_servicedir_copy_one (char const *src, char const *dst, s6_servicedir_de
{
if (errno != ENOENT || p->options & S6_SVFILE_MANDATORY) return 0 ;
}
+ if (!strcmp(p->name, "template"))
+ {
+ memcpy(dstfn + dstlen + 1, "instance", 9) ;
+ if (mkdir(dstfn, 0755) == -1 && errno != EEXIST) return 0 ;
+ }
break ;
default : return (errno = EDOM, 0) ;
}