base之ipkg

ipkg主页: http://handhelds.org/moin/moin.cgi/Ipkg

 

1.

ipkg的软件包管理信息存储在/usr/lib/ipkg目录。

ipkg

    --alternatives

    --info

    --lists

    --status

 

2.关于"Post Install Scripts"

To add a post-installation script to a package, add a pkg_postinst_PACKAGENAME() function to the .bb file where PACKAGENAME is the name of the package to attach the postinst script to. A post-installation function has the following structure:

The script defined in the post installation function gets called when the rootfs is made. If the script succeeds, the package is marked as installed. If the script fails, the package is marked as unpacked and the script will be executed again on the first boot of the image.

Sometimes it is necessary that the execution of a post-installation script is delayed until the first boot, because the script needs to be executed on the device itself. To delay script execution until boot time, the post-installation function should have the following structure:

The structure above delays execution until first boot because the D variable points to the 'image' directory when the rootfs is being made at build time but is unset when executed on the first boot.

 

同时,在"/etc/rcS.d/S98configure"文件中有这么几行:

参考usage: ipkg [options...] sub-command [arguments...]

where sub-command is one of:

configure [<pkg>]              Configure unpacked packages --重新执行post-installation script

 

综上,在ipkg软件包管理目录的status文件中会记录每个软件包的状态,由此可实现两阶段的"Post Install Scripts"。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值