[OpenWrt-Devel] Question about custom script at init on Trunk.-

Karl Palsson karlp at tweak.net.au
Wed Jan 27 07:08:19 EST 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Lang <david at lang.hm> wrote:
> >
> > Now, yes, I can have my 80_mystuff script go and try and create
> > the package config files it might want to modify, but really, I
> > want "mystuff" to run _last_ or at least, after all the packages
> > have run. Is there any better system for this other than just
> > naming my script zzzzz_mystuff instead of 80_mystuff? Is that
> > expected to be "good enough" ?
> >
> > I'm trying this, because I've _been_ trying to use packages
> > instead of modifying upstream, but when I want my package to do
> > different things for different targets, it's seemed easier to
> > hook into the existing target code, rather than trying to copy
> > target detection and config into a package Config.in options
> 
> typically people use 99stuff and figure that the order of 99s
> doesn't really matter much
> 

Well, the thing is, 99 isn't last. that's what I was getting at.

$ ls -l build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/etc/uci-defaults/
total 140
- -rw-r--r-- 1 karlp karlp 128 Jan 26 13:32 00_uhttpd_ubus
- -rwxrwxr-x 1 karlp karlp 17158 Jan 20 17:20 01_leds -rwxrwxr-x 1
karlp karlp 10391 Jan 20 17:22 02_network -rwxrwxr-x 1 karlp
karlp 1673 Sep 25 11:01 03_network-switchX-migration -rwxrwxr-x 1
karlp karlp 351 Sep 25 11:01 03_network-vlan-migration -rwxrwxr-x
1 karlp karlp 1244 Sep 25 11:01 04_led_migration -rwxrwxr-x 1
karlp karlp 232 Sep 25 11:01 09_fix-seama-header -rw-rw-r-- 1
karlp karlp 193 Sep 25 11:01 09_fix-trx-header -rw-r--r-- 1 karlp
karlp 74 Jan 27 10:56 10-fstab -rw-rw-r-- 1 karlp karlp 418 Sep
25 11:01 10_migrate-shadow -rw-rw-r-- 1 karlp karlp 450 Sep 25
11:01 11_migrate-sysctl -rw-rw-r-- 1 karlp karlp 377 Sep 25 11:01
12_network-generate-ula -rw-rw-r-- 1 karlp karlp 377 Sep 25 11:01
99_stuff_here -rw-rw-r-- 1 karlp karlp 211 Aug 21 12:40
agent_etactica -rwxr-xr-x 1 karlp karlp 83 Jan 11 15:05
luci-i18n-english -rwxr-xr-x 1 karlp karlp 1285 Jan 26 13:33
mosquitto.uci-defaults -rw-rw-r-- 1 karlp karlp 479 Aug 21 12:40
mpacker -rwxrwxr-x 1 karlp karlp 291 Aug 21 12:40 mq_delta_gadget
- -rwxrwxr-x 1 karlp karlp 970 Aug 21 12:40 mrelay -rwxr-xr-x 1
karlp karlp 300 Jan 26 13:29 odhcpd.defaults -rwxrwxr-x 1 karlp
karlp 224 Sep 24 14:24 snmpd

Here's what you really have in a new image. Putting things in
"99_stuff" just won't work very well. All the package provided
uci-defaults files, which are the ones I want to extend/augment
with my own files have to come later. They are run at
/etc/rc.d/S10boot,

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIbBAEBAgAGBQJWqLMzAAoJEBmotQ/U1cr2bW8P93PKOyhaBckgfSaOgeDCI23A
T7Tx9N3pRkVoZ9D+DAU+HdmMdWUB8Wt59Qzn37OYSxGyieYTflkgLgCluTX5Mkxg
Hew64Vq3TVlZIcoBGiDbDE+YiNBqQ26bO3BTeCtuq6vIdzl2fX9LO8Hv0sKCFXpt
fgb/B3eNaUQdrFeZZNj+Ay3/ZxUJz8ofYp4BcV9rY9NF1HdesLrdJ9MIcIfPRWrc
cyyTsukrzfMilkeujOqjsNrJdlteU1+jJ844jnMGsOjw9YhB3k+g7sF+z5B2yeOL
EmBy5CJo4sDZYJOKdeA5w9LbVjPhS1cqpfRj6u+CEWVJHvHwsmUDR9OroVzfyUw/
GZHzsOwrTClaRrvgKV8Z/sZTCOFD+8STZs+kucD46JBkmUDAmnkMQrAT0F18lQXm
PEDWWn/aF9IoWXEOjBbOQNrGhzcjF1emoGpgPgD29o5y30gr0qW/kpFPSkUu0wup
3A1iyT5vwWxbP89Wd6n5PslE0K3e3om6TbNPNHd1s2H1l5dac4LVODfb5sHAkyCs
8YYZzPD7YFVZeN5aNpFmgfzQtPoop3sR/hZb/Ay44P1Y1kAAzRXcglF3iXm7j691
amd4KMMv+NVbWyU2p65ZfKNFCS7pDjfh4MbE6UZIlYkjDipqJRx8ZRQD6Qvmq98k
yLIkjtpNL4eW/q997rE=
=eSyW
-----END PGP SIGNATURE-----
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list