Ver código fonte

logd: create log directory for log_file

If log_file is specified, make sure its directory exists.

Signed-off-by: Karl Palsson <[email protected]>
Signed-off-by: Hans Dedecker <[email protected]> [PKG_RELEASE increase]
Karl Palsson 7 anos atrás
pai
commit
987e10af07
2 arquivos alterados com 3 adições e 1 exclusões
  1. 1 1
      package/system/ubox/Makefile
  2. 2 0
      package/system/ubox/files/log.init

+ 1 - 1
package/system/ubox/Makefile

@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ubox
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git

+ 2 - 0
package/system/ubox/files/log.init

@@ -55,6 +55,8 @@ start_service_file()
 	}
 	[ -z "${log_file}" ] && return
 
+	mkdir -p "$(dirname "${log_file}")"
+
 	procd_open_instance
 	procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file"
 	[ -n "${log_size}" ] && procd_append_param command -S "$log_size"