Created
February 11, 2017 13:39
-
-
Save alfredkrohmer/8d4c2a5ab62e690772f3d9de5ad2d978 to your computer and use it in GitHub Desktop.
List all user-installed packages on OpenWrt / LEDE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
FLASH_TIME=$(opkg info busybox | grep '^Installed-Time: ') | |
for i in $(opkg list-installed | cut -d' ' -f1) | |
do | |
if [ "$(opkg info $i | grep '^Installed-Time: ')" != "$FLASH_TIME" ] | |
then | |
echo $i | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as someone suggested on https://www.sindastra.de/p/1213/list-user-installed-packages-in-openwrt
You can update busybox via opkg update, so it’s install time can be wrong as reference.
As a result you will have wrong list.
Only one thing you cannot install via opkg is kernel – because you update it over flashing new firmware.
So the kernel’s install time should be used as flash time.
FLASH_TIME=$(opkg info kernel | grep ‘^Installed-Time: ‘)