diff options
| author | Sebastian Kemper <sebastian_ml@gmx.net> | 2020-10-04 15:23:05 +0200 |
|---|---|---|
| committer | Sebastian Kemper <sebastian_ml@gmx.net> | 2020-10-04 15:29:01 +0200 |
| commit | 4da7d848dfe4477ca2c102f39b52ee68dfb502df (patch) | |
| tree | 3f7677f8b476a82adde43357f6627df6f9fc545d | |
| parent | 667774af23d9d506268f475f1e443ac4b9013903 (diff) | |
baresip: use FILE_MODES instead of postinst
We can now set permissions directly thanks to OpenWrt having added
fakeroot support.. This also changes the permissions of /etc/baresip so
that baresip can write to this directory. For instance it wants to write
the file /etc/baresip/current_contact for which it needs the appropriate
permissions (baresip is started by user baresip).
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
| -rw-r--r-- | net/baresip/Makefile | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/net/baresip/Makefile b/net/baresip/Makefile index 33af8b8..5e047ec 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -67,6 +67,11 @@ $(call Package/baresip/Default) DEPENDS:=+libre +librem USERID:=$(PKG_NAME)=374:$(PKG_NAME)=374 MENU:=1 + FILE_MODES:= \ + /etc/baresip:baresip:baresip:0750 \ + /etc/baresip/accounts:baresip:baresip:0640 \ + /etc/baresip/config:baresip:baresip:0640 \ + /etc/baresip/contacts:baresip:baresip:0640 endef baresip-mod-alsa := USE_ALSA @@ -122,7 +127,7 @@ define Package/baresip/install $(INSTALL_DIR) $(1)/etc/baresip $(SED) '/^#/!s/^/#/' $(PKG_BUILD_DIR)/docs/examples/accounts $(SED) '/^#module_path/s|^#||;s|/local||' $(PKG_BUILD_DIR)/docs/examples/config - $(INSTALL_CONF) $(PKG_BUILD_DIR)/docs/examples/{accounts,config,contacts} $(1)/etc/baresip + $(INSTALL_DATA) $(PKG_BUILD_DIR)/docs/examples/{accounts,config,contacts} $(1)/etc/baresip $(INSTALL_DIR) $(1)/etc/default $(INSTALL_CONF) ./files/baresip.default $(1)/etc/default/baresip $(INSTALL_DIR) $(1)/etc/init.d @@ -137,17 +142,6 @@ define Package/baresip/conffiles /etc/init.d/baresip endef -define Package/baresip/postinst -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - chown $(PKG_NAME):$(PKG_NAME) \ - /etc/baresip/accounts \ - /etc/baresip/config \ - /etc/baresip/contacts -fi -exit 0 -endef - ################## # bareSIP modules # 1. Name |
