mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
keepalived: add upgrade script for globals section
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
committed by
Florian Eckert
parent
fd7e741474
commit
9b24763b9f
@@ -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
|
||||
|
||||
12
net/keepalived/files/etc/uci-defaults/keepalived
Normal file
12
net/keepalived/files/etc/uci-defaults/keepalived
Normal 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
|
||||
Reference in New Issue
Block a user