asterisk-13.x: change some default file locations
- Set data dir to /usr/share/asterisk and use default locations for everything else. - This is more in line with FHS. Database files are now written to tmpfs (/var is mounted there). This prevents the rootfs from filling up. It also prevents the flash to degrade during constant database rewriting. - As the data dir changes, so does the location of the sound files. This commit also takes care of that. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
parent
9cc45ac007
commit
a430a3a59b
2 changed files with 8 additions and 12 deletions
|
@ -46,8 +46,8 @@ define Package/asterisk13/install/sbin
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/asterisk13/install/sounds
|
define Package/asterisk13/install/sounds
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
|
$(INSTALL_DIR) $(1)/usr/share/asterisk/sounds/
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/$(2) $(1)/usr/lib/asterisk/sounds/
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/asterisk/sounds/en/$(2) $(1)/usr/share/asterisk/sounds/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define BuildAsterisk13Module
|
define BuildAsterisk13Module
|
||||||
|
@ -145,7 +145,7 @@ $(call Package/asterisk13/install/sbin,$(1),safe_asterisk)
|
||||||
$(call Package/asterisk13/install/sbin,$(1),astgenkey)
|
$(call Package/asterisk13/install/sbin,$(1),astgenkey)
|
||||||
$(foreach m,$(AST_CFG_FILES),$(call Package/asterisk13/install/conffile,$(1),$(m));)
|
$(foreach m,$(AST_CFG_FILES),$(call Package/asterisk13/install/conffile,$(1),$(m));)
|
||||||
$(foreach m,$(AST_EMB_MODULES),$(call Package/asterisk13/install/module,$(1),$(m));)
|
$(foreach m,$(AST_EMB_MODULES),$(call Package/asterisk13/install/module,$(1),$(m));)
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
|
$(INSTALL_DIR) $(1)/usr/share/asterisk/sounds/
|
||||||
$(INSTALL_DIR) $(1)/etc/default
|
$(INSTALL_DIR) $(1)/etc/default
|
||||||
$(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
|
$(INSTALL_DATA) ./files/asterisk.default $(1)/etc/default/asterisk
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
@ -163,9 +163,9 @@ This package provides the sound-files for Asterisk-13.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/asterisk13-sounds/install
|
define Package/asterisk13-sounds/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
|
$(INSTALL_DIR) $(1)/usr/share/asterisk/sounds/
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/asterisk/sounds/en/* $(1)/usr/share/asterisk/sounds/
|
||||||
rm -f $(1)/usr/lib/asterisk/sounds/vm-*
|
rm -f $(1)/usr/share/asterisk/sounds/vm-*
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk13-chan-dahdi),)
|
ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk13-chan-dahdi),)
|
||||||
|
@ -263,10 +263,7 @@ define Build/Compile
|
||||||
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY"
|
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY"
|
||||||
ASTLDFLAGS="$(EXTRA_LDFLAGS)"
|
ASTLDFLAGS="$(EXTRA_LDFLAGS)"
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||||
ASTVARLIBDIR="/usr/lib/asterisk" \
|
ASTDATADIR="/usr/share/asterisk" \
|
||||||
ASTDATADIR="/usr/lib/asterisk" \
|
|
||||||
ASTKEYDIR="/usr/lib/asterisk" \
|
|
||||||
ASTDBDIR="/usr/lib/asterisk" \
|
|
||||||
NOISY_BUILD="yes" \
|
NOISY_BUILD="yes" \
|
||||||
DEBUG="" \
|
DEBUG="" \
|
||||||
OPTIMIZE="" \
|
OPTIMIZE="" \
|
||||||
|
|
|
@ -14,8 +14,7 @@ start() {
|
||||||
[ -d $DEST/var/run/asterisk ] || mkdir -p $DEST/var/run/asterisk
|
[ -d $DEST/var/run/asterisk ] || mkdir -p $DEST/var/run/asterisk
|
||||||
[ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk
|
[ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk
|
||||||
[ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk
|
[ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk
|
||||||
[ -d $DEST/var/lib ] || mkdir -p $DEST/var/lib
|
[ -d $DEST/var/lib/asterisk ] || mkdir -p $DEST/var/lib/asterisk
|
||||||
[ -h $DEST/var/lib/asterisk ] || ln -s /usr/lib/asterisk /var/lib/asterisk
|
|
||||||
[ -d $DEST/var/lib/asterisk/keys ] || mkdir -p $DEST/var/lib/asterisk/keys
|
[ -d $DEST/var/lib/asterisk/keys ] || mkdir -p $DEST/var/lib/asterisk/keys
|
||||||
[ -d $DEST/var/log/asterisk/cdr-csv ] || mkdir -p $DEST/var/log/asterisk/cdr-csv
|
[ -d $DEST/var/log/asterisk/cdr-csv ] || mkdir -p $DEST/var/log/asterisk/cdr-csv
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue