asterisk11: 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 and fixes issue #38. 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
5022cd6c2c
commit
203301581c
2 changed files with 8 additions and 12 deletions
|
@ -47,8 +47,8 @@ define Package/asterisk11/install/sbin
|
|||
endef
|
||||
|
||||
define Package/asterisk11/install/sounds
|
||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/$(2) $(1)/usr/lib/asterisk/sounds/
|
||||
$(INSTALL_DIR) $(1)/usr/share/asterisk/sounds/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/asterisk/sounds/en/$(2) $(1)/usr/share/asterisk/sounds/
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
|
@ -162,10 +162,10 @@ This package provides sounds for Asterisk11.
|
|||
endef
|
||||
|
||||
define Package/asterisk11-sounds/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/asterisk/sounds/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/asterisk/sounds/en/* $(1)/usr/lib/asterisk/sounds/
|
||||
rm -f $(1)/usr/lib/asterisk/sounds/vm-*
|
||||
rm -f $(1)/usr/lib/asterisk/sounds/conf-*
|
||||
$(INSTALL_DIR) $(1)/usr/share/asterisk/sounds/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/asterisk/sounds/en/* $(1)/usr/share/asterisk/sounds/
|
||||
rm -f $(1)/usr/share/asterisk/sounds/vm-*
|
||||
rm -f $(1)/usr/share/asterisk/sounds/conf-*
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_asterisk11-chan-dahdi),)
|
||||
|
@ -340,10 +340,7 @@ define Build/Compile
|
|||
ASTCFLAGS="$(EXTRA_CFLAGS)" \
|
||||
ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" \
|
||||
ASTVARLIBDIR="/usr/lib/asterisk" \
|
||||
ASTDATADIR="/usr/lib/asterisk" \
|
||||
ASTKEYDIR="/usr/lib/asterisk" \
|
||||
ASTDBDIR="/usr/lib/asterisk" \
|
||||
ASTDATADIR="/usr/share/asterisk" \
|
||||
NOISY_BUILD="yes" \
|
||||
DEBUG="" \
|
||||
OPTIMIZE="" \
|
||||
|
|
|
@ -12,8 +12,7 @@ start() {
|
|||
[ -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/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk
|
||||
[ -d $DEST/var/lib ] || mkdir -p $DEST/var/lib
|
||||
[ -h $DEST/var/lib/asterisk ] || ln -s /usr/lib/asterisk /var/lib/asterisk
|
||||
[ -d $DEST/var/lib/asterisk ] || mkdir -p $DEST/var/lib/asterisk
|
||||
[ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue