not sure what i should expect here, but when i install watchcat,
there appears to be an install issue in that the watchcat UCI config
content is not added to /etc/config/system.
if i examine /etc/config/system before the install, there is no
section for watchcat -- so far, so good. then:
root@OpenWrt:~# opkg install watchcat
Package watchcat (1-5) installed in root is up to date.
root@OpenWrt:~#
again, that looks good, but nothing has been added to
/etc/config/system. and if i look under /overlay/etc/uci-defaults, i
see:
root@OpenWrt:/overlay/etc/uci-defaults# ls -1F
00_uhttpd_ubus@
01_leds@
02_network@
03_network-switchX-migration@
03_network-vlan-migration@
04_led_migration@
09_fix-seama-header@
09_fix-trx-header@
10_migrate-shadow@
11_migrate-sysctl@
12_network-generate-ula@
30_uboot-envtools@
50-watchcat* <----- now there, and a reg file
luci-theme-bootstrap@
odhcpd.defaults@
#
the result of doing the install of watchcat added the uci-defaults
script, but it appears to not have been processed as it isn't a
symlink to "(overlay-whiteout)" like all the rest. its content makes
perfect sense -- programatically adding content to /etc/config/system:
#!/bin/sh
uci -q show system.@watchcat[0] || {
uci add system watchcat
uci set system.@watchcat[0].period=6h
uci set system.@watchcat[0].mode=ping
uci set system.@watchcat[0].pinghosts=8.8.8.8
uci set system.@watchcat[0].forcedelay=30
uci commit
}
and if i now invoke that file *manually*, it does the right thing and
adds that content to /etc/config/system, but there is a parse error at
the end of the output from running it manually:
# ./50-watchcat
system.@system[0]=system
system.@system[0].hostname=OpenWrt
system.@system[0].timezone=UTC
system.ntp=timeserver
system.ntp.server=0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org
2.openwrt.pool.ntp.org 3.openwrt.pool.ntp.org
system.ntp.enabled=1
system.ntp.enable_server=0
system.led_usb1=led
system.led_usb1.name=USB1
system.led_usb1.sysfs=tp-link:green:usb1
system.led_usb1.trigger=usbdev
system.led_usb1.dev=1-1
system.led_usb1.interval=50
system.led_usb2=led
system.led_usb2.name=USB2
system.led_usb2.sysfs=tp-link:green:usb2
system.led_usb2.trigger=usbdev
system.led_usb2.dev=2-1
system.led_usb2.interval=50
system.led_wlan2g=led
system.led_wlan2g.name=WLAN2G
system.led_wlan2g.sysfs=tp-link:blue:wlan2g
system.led_wlan2g.trigger=phy0tpt
cfg08e014
uci: Parse error (invalid character in field) at line 64, byte 17
#
but it seems to have worked (and the new section has been added to
the bottom of /etc/config/system):
# uci show system.@watchcat[0]
system.cfg08e014=watchcat
system.cfg08e014.period=6h
system.cfg08e014.mode=ping
system.cfg08e014.pinghosts=8.8.8.8
system.cfg08e014.forcedelay=30
#
so why didn't this happen at package installation time? am i missing
something trivially obvious here?
oh, and conversely, when i remove that package, is it expected that
its UCI content should be removed from /etc/config/system? is that the
defined behaviour in cases like this?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users