summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/s6-rc/s6-rc-init.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/s6-rc/s6-rc-init.c b/src/s6-rc/s6-rc-init.c
index 3ea1a23..b61d73e 100644
--- a/src/s6-rc/s6-rc-init.c
+++ b/src/s6-rc/s6-rc-init.c
@@ -188,7 +188,7 @@ int main (int argc, char const *const *argv)
unsigned int i = 0 ;
int r ;
uint16 ids[ndirs] ;
- char srcfn[llen + 20 + maxlen] ;
+ char srcfn[llen + 23 + maxlen] ;
char dstfn[llen + 9 + sizeof(S6_SVSCAN_CTLDIR "/control") + maxlen] ;
rewinddir(dir) ;
byte_copy(srcfn, llen + 12, lfn) ;
@@ -222,6 +222,17 @@ int main (int argc, char const *const *argv)
strerr_diefu2sys(111, "touch ", srcfn) ;
}
close(r) ;
+ byte_copy(srcfn + llen + 14 + thislen, 9, "log/down") ;
+ r = open_trunc(srcfn) ;
+ if (r < 0)
+ {
+ if (errno != ENOENT)
+ {
+ cleanup(live) ;
+ strerr_diefu2sys(111, "touch ", srcfn) ;
+ }
+ }
+ else close(r) ;
byte_copy(srcfn + llen + 14 + thislen, 6, "event") ;
if (!ftrigw_fifodir_make(srcfn, gid, 0))
{