1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 11:53:59 +02:00

keepalived: add upgrade script for globals section

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert 2020-04-30 08:39:59 +02:00 committed by Florian Eckert
parent fd7e741474
commit 9b24763b9f
2 changed files with 16 additions and 0 deletions

View File

@ -216,6 +216,10 @@ define Package/keepalived/install
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/keepalived/keepalived.conf \
$(1)/etc/keepalived/
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/etc/uci-defaults/keepalived \
$(1)/etc/uci-defaults/keepalived
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/keepalived.init \
$(1)/etc/init.d/keepalived

View File

@ -0,0 +1,12 @@
#!/bin/sh
# Check if old config section is still in use
uci show keepalived.@global_defs[-1] 1>/dev/null 2>/dev/null
if [ "$?" -eq "0" ]; then
uci -q rename keepalived.@global_defs[-1]=globals
uci -q commit keepalived
sed -i "s|^config global_defs 'globals'$|config globals 'globals'|" \
/etc/config/keepalived
fi
exit 0