Hi,
I need to add one entry to the crontab from within a package.
In order to do this I've added the following section to the
Makefile
define Package/wing/postinst
#!/bin/sh
($${IPKG_INSTROOT}/usr/bin/crontab -l 2>/dev/null | grep -v
"/usr/bin/myscript"; echo "5 0 * * * /usr/bin/myscript") |
$${IPKG_INSTROOT}/usr/bin/crontab - 2>/dev/null
exit 0
endef
However this works only if I install the package on a running router.
In fact if the script is run during the firmware buld procedure the
${IPKG_INSTROOT}/usr/bin/crontab is the crontab of the target board
which in general cannot be executed on the machine used for building
the firmware.
How can I solve this problem?
--
--------------------------------------------------------
Roberto Riggio, PhD
CREATE-NET
Via alla Cascata 56/C
38100 Trento (Italy)
E-mail: [EMAIL PROTECTED]
HomePage: http://disi.unitn.it/~riggio/
Tel: +39.0461.40.84.00 (ext. 708)
Fax: +39.0461.314.972
--------------------------------------------------------
_______________________________________________
openwrt-users mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users