[OpenWrt-Devel] Build ipk and make autostart?

Karl P karlp at tweak.net.au
Sat Sep 13 08:24:52 EDT 2014


Presumably this one: https://dev.openwrt.org/changeset/42470

For the mortals among us,

a) does this mean all packages now start as soon as they're installed?
It used to be that packages that were selected and _built in_ to an image were 
listed to start automatically, but packages manually installed didn't start and 
needed to be enabled manually.  No dramas if this is now automatic, just want to 
know if it's changed.

b) if a) then presumably we can update the wiki and drop a bunch of 
prerm/postinst scripts from a lot of packages now?

c) That changeset also seems to have support for installing users/groups.  Do 
you have an example of how to use this?  package scripts used to manually check 
for users and have to add them in the init scripts, so this is a nice feature, 
but it needs to be known about before anyone can use it.

Sincerely,
Karl Palsson

On 09/13/2014 10:41 AM, John Crispin wrote:
> Hi,
>
> imho all replies are superflous. i did fix this in trunk 3 days ago by
> adding a generic postinst that will cal the enable and start target
>
> 	John
>
>
> On 13/09/2014 10:53, Nguyễn Hồng Quân wrote:
>> Hi Jiří,
>>
>> My init script (puppysplash) is already executable as shown below
>>
>> root at OpenWrt:~# ls -l /etc/init.d/ -rwxr-xr-x    1 root     root
>> 1419 Apr 16 17:32 boot -rwxr-xr-x    1 root     root           729
>> Sep 13 07:07 cron -rwxr-xr-x    1 root     root           330 Dec
>> 12  2013 defconfig -rwxr-xr-x    1 root     root         13785 Sep
>> 13 07:08 dnsmasq -rwxr-xr-x    1 root     root           252 Apr 16
>> 17:32 done -rwxr-xr-x    1 root     root          4139 Sep 13 07:07
>> dropbear -rwxr-xr-x    1 root     root          1022 Sep 13 07:08
>> firewall -rwxr-xr-x    1 root     root          2015 Dec 12  2013
>> led -rwxr-xr-x    1 root     root          2119 Sep 13 07:07 log
>> -rwxr-xr-x    1 root     root           835 Apr 16 17:33
>> luci_dhcp_migrate -rwxr-xr-x    1 root     root           368 Sep
>> 13 08:47 luci_fixtime -rwxr-xr-x    1 root     root          2912
>> Apr 16 17:32 network -rwxr-xr-x    1 root     root           244
>> Sep 13 07:07 odhcpd -rwxr-xr-x    1 root     root           254 Sep
>> 13 08:44 puppysplash -rwxr-xr-x    1 root     root           125
>> Dec 12  2013 sysctl -rwxr-xr-x    1 root     root           309 Apr
>> 16 17:32 sysfixtime -rwxr-xr-x    1 root     root           716 Sep
>> 13 07:07 sysntpd -rwxr-xr-x    1 root     root          1037 Apr 16
>> 17:32 system -rwxr-xr-x    1 root     root           926 Sep 13
>> 07:07 telnet -rwxr-xr-x    1 root     root          3411 Sep 13
>> 07:07 uhttpd -rwxr-xr-x    1 root     root           106 Apr 16
>> 17:32 umount
>>
>> But it doesn't start automatically.
>>
>> On Sat, Sep 13, 2014 at 3:28 PM, Jiří Šlachta <slachta at cesnet.cz
>> <mailto:slachta at cesnet.cz>> wrote:
>>
>> Hi,
>>
>> there is no need to enable the init script in postinst. The only
>> thing you need to make it start automatically is to give the
>> executable bit to the init script.
>>
>> See below:
>>
>> define Package/package/install $(INSTALL_DIR) $(1)/etc/init.d
>> $(INSTALL_BIN) ./files/package.init $(1)/etc/init.d/package endef
>>
>>
>> -- *********************************************** * Nguyễn Hồng
>> Quân                            * * Y!M: ng_hquan_vn
>> * * Facebook: ng.hong.quan                      * * Web:
>> quan.hoabinh.vn <http://quan.hoabinh.vn>                        *
>> ***********************************************
>>
>>
>> _______________________________________________ openwrt-devel
>> mailing list openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
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