radxa / apt

radxa debian packages repository
http://radxa.com/Rabian
35 stars 6 forks source link

[Suggestion] Use symlinks for zz-update-extlinux and zz-update-uenv #16

Open MichaIng opened 2 years ago

MichaIng commented 2 years ago

Just a minor suggestion: Currently the /etc/kernel/(postinst.d|postrm.d)/zz-update-(extlinux|uenv) scripts are bash scripts which only load /usr/local/sbin/update_extlinux.sh or /usr/local/sbin/update_uenv.sh respectively. It would be less overhead when those four scripts instead were symbolic links to the finally executed ones. Doing the following works well with kernel upgrades/installs/removals:

ln -sf /usr/local/sbin/update_uenv.sh postinst.d/zz-update-uenv
ln -sf /usr/local/sbin/update_uenv.sh postrm.d/zz-update-uenv
ln -sf /usr/local/sbin/update_extlinux.sh postinst.d/zz-update-extlinux
ln -sf /usr/local/sbin/update_extlinux.sh postrm.d/zz-update-extlinux

So no additional bash shells are loaded and less actual files shipped.

This was found in the rockchip-overlay package and on the Radxa Zero Debian image (where the same files are present without this package).