Run "opkg save" from LuCi commands (opkg extras)

Hi all, hi @vgaetera

I like the opkg extras to manage the packages but I missed an option to run opkg save from Webinterface. So I installed LuCi commands plugin and try to execute opkg save from there but it does not work. The command can be executed only from shell. I tried to run from profile.d folder but there are no execution rights. Before I break something I want to ask what is the best way to run opkg save from Web GUI.


1 Like
opkg update
opkg install luci-app-commands
/etc/init.d/rpcd restart
cat << "EOF" > /usr/bin/opkg-extras
. /etc/profile.d/
opkg "${@}"
chmod +x /usr/bin/opkg-extras
cat << EOF >> /etc/sysupgrade.conf
uci -q delete luci.opkg_update
uci set luci.opkg_update="command"
uci set luci.opkg_update.command="opkg update"
uci set"Update Opkg lists"
uci -q delete luci.opkg_save
uci set luci.opkg_save="command"
uci set luci.opkg_save.command="opkg-extras save"
uci set"Save Opkg profile"
uci -q delete luci.opkg_restore
uci set luci.opkg_restore="command"
uci set luci.opkg_restore.command="opkg-extras restore"
uci set"Restore Opkg profile"
uci -q delete luci.opkg_rollback
uci set luci.opkg_rollback="command"
uci set luci.opkg_rollback.command="opkg-extras rollback"
uci set"Rollback Opkg profile"
uci commit luci

Perfect. You should add this to the Wiki page. Would be very helpful to save the profile directly after installing a package via Luci. :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.