Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:advanced:opkg_extras [2021/09/23 20:20] – fix looping vgaeteradocs:guide-user:advanced:opkg_extras [2023/10/03 18:19] – [Instructions] delay for networking to become ready vgaetera
Line 1: Line 1:
 ====== Opkg extras ====== ====== Opkg extras ======
-{{section>meta:infobox:howto_links#cli_skills&noheader&nofooter&noeditbutton}}+{{section>meta:infobox:howto_links#basic_skills&noheader&nofooter&noeditbutton}}
  
 ===== Introduction ===== ===== Introduction =====
-  * This instruction extends [[docs:guide-user:additional-software:opkg|Opkg]] functionality. +  * This instruction extends the functionality of [[docs:guide-user:additional-software:opkg|Opkg]].
-  * Follow [[docs:guide-user:advanced:hotplug_extras|Hotplug extras]] to extend Hotplug functionality. +
-  * Follow [[docs:guide-user:advanced:uci_extras|UCI extras]] to extend UCI functionality.+
   * Follow the [[docs:guide-user:advanced:opkg_extras#automated|automated]] section for quick setup.   * Follow the [[docs:guide-user:advanced:opkg_extras#automated|automated]] section for quick setup.
  
Line 15: Line 13:
   * Restore automatically after firmware upgrade.   * Restore automatically after firmware upgrade.
   * Upgrade all upgradable packages.   * Upgrade all upgradable packages.
-  * Find new configurations.+  * Fix symbolic links for installed alternatives. 
 +  * Find new configurations for upgraded packages.
  
 ===== Implementation ===== ===== Implementation =====
   * Wrap Opkg calls to provide a seamless invocation method.   * Wrap Opkg calls to provide a seamless invocation method.
   * Rely on [[docs:guide-user:base-system:uci|UCI]] and [[https://github.com/openwrt/openwrt/blob/master/package/base-files/Makefile#L47|backup defaults]] to store and manage profiles.   * Rely on [[docs:guide-user:base-system:uci|UCI]] and [[https://github.com/openwrt/openwrt/blob/master/package/base-files/Makefile#L47|backup defaults]] to store and manage profiles.
-  * Identify package types with [[man>grep(1)|grep]] and [[man>find(1)|find]], and overlay with [[man>mount(8)|mount]]. +  * Identify package types with [[man>grep(1)|grep]] and [[man>find(1)|find]], and RWM with [[man>mount(8)|mount]]. 
-  * Support importing [[https://github.com/openwrt/openwrt/blob/master/package/base-files/files/sbin/sysupgrade#L245-L251|user-installed]] packages from [[docs:techref:sysupgrade|Sysupgrade]]. +  * Support importing [[https://github.com/openwrt/openwrt/blob/master/package/base-files/files/sbin/sysupgrade#L249-L255|user-installed]] packages from [[docs:techref:sysupgrade|Sysupgrade]]. 
-  * Use [[docs:guide-user:base-system:hotplug|Hotplug]] to detect WAN connectivity and trigger profile restore.+  * Use [[docs:guide-user:advanced:hotplug_extras|Hotplug extras]] to detect WAN connectivity and trigger profile restore.
   * Utilize lockfiles with [[https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/patches/220-add_lock_util.patch|lock]] to avoid race conditions and loops.   * Utilize lockfiles with [[https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/patches/220-add_lock_util.patch|lock]] to avoid race conditions and loops.
   * Perform [[man>reboot(8)|reboot]] to apply changes after automatic profile restore.   * Perform [[man>reboot(8)|reboot]] to apply changes after automatic profile restore.
-  * Write and read non-interactive logs with [[docs:guide-user:base-system:log.essentials|Syslog]] for troubleshooting. 
   * Fetch the default profile to restore and roll back from UCI, unless specified manually.   * Fetch the default profile to restore and roll back from UCI, unless specified manually.
   * Take precedence for remove over install to avoid package conflicts while restoring profile.   * Take precedence for remove over install to avoid package conflicts while restoring profile.
Line 32: Line 30:
  
 ===== Commands ===== ===== Commands =====
-Opkg sub-command ^ Description ^ +Sub-command ^ Description ^ 
-| ''**help**''Show Opkg extras. |+| ''**init**'' | Initialize Opkg configuration. | 
 +| ''**uci** [<prof>] < <uciprof>''Import Opkg profile from stdin or file to UCI. |
 | ''**import** [<bakprof>]'' | Import Opkg profile from Sysupgrade backup to UCI. | | ''**import** [<bakprof>]'' | Import Opkg profile from Sysupgrade backup to UCI. |
-| ''**save** [<prof>]'' | Save the current Opkg profile to UCI. | +| ''**save**'' | Save the current Opkg profile to UCI. | 
-| ''**restore** [<prof>]'' | Restore Opkg profile:\\ ''auto'' or none - default profile,\\ ''rwm'' - RWM profile,\\ ''custom'' - custom profile. |+| ''**restore** [<prof>]'' | Restore Opkg profile:\\ ''main'' or none - default profile,\\ ''init'' - RWM/minimal profile,\\ ''custom'' - custom profile. |
 | ''**rollback** [<prof>]'' | Roll back Opkg profile:\\ remove user-installed packages,\\ install user-removed packages,\\ skip upgraded packages. | | ''**rollback** [<prof>]'' | Roll back Opkg profile:\\ remove user-installed packages,\\ install user-removed packages,\\ skip upgraded packages. |
 | ''**upgr** [<pkgtype>]'' | Upgrade packages by type:\\ ''ai'' or none - all installed,\\ ''oi'' - overlay-installed. | | ''**upgr** [<pkgtype>]'' | Upgrade packages by type:\\ ''ai'' or none - all installed,\\ ''oi'' - overlay-installed. |
Line 42: Line 41:
 | ''**proc** <cmd> < <pkgs>'' | Process packages from stdin with the given sub-command. | | ''**proc** <cmd> < <pkgs>'' | Process packages from stdin with the given sub-command. |
 | ''**reinstall** <pkgs>'' | Reinstall specific packages. | | ''**reinstall** <pkgs>'' | Reinstall specific packages. |
-| ''**newconf** [<path>]''Find new configurations. | +| ''**altlink**''Fix symbolic links for installed alternatives. | 
-| ''**uci** <cmd> [<prof>]''Operate UCI configuration with the given sub-command:\\ ''get'' - get Opkg profile,\\ ''set'' - store Opkg profile,\\ ''init'' - initialize Opkg profile. |+| ''**newconf** [<path>]''Find new configurations for upgraded packages. |
  
 ===== Instructions ===== ===== Instructions =====
 +Copy the following text and paste it in a SSH or serial console of the device
 <code bash> <code bash>
 # Configure profile # Configure profile
Line 52: Line 52:
 opkg() { opkg() {
 local OPKG_CMD="${1}" local OPKG_CMD="${1}"
-local OPKG_ARG="$(opkg_uci_get "${OPKG_CMD}" "${2}")" +local OPKG_UCI="$(uci -q get opkg.defaults."${OPKG_CMD}")" 
-local OPKG_OPT="$(opkg_uci_get "${OPKG_CMD}" "${3}")+case "${OPKG_CMD}" in 
-if ! type opkg_"${OPKG_CMD}" &> /dev/null +(init|uci|import|save|restore|rollback|upgr\ 
-then command opkg "${@}" +|export|proc|reinstall|altlink|newconf) opkg_"${@}" ;; 
-else shift +(*) command opkg "${@}" ;; 
-opkg_"${OPKG_CMD}" "${@}" +esac
-fi+
 } }
  
-opkg_help() { +opkg_init() { 
-cat << EOI +uci import opkg < /dev/null 
-opkg [help|import|save|restore|rollback|upgr\ +uci -q batch << EOI 
-|export|proc|reinstall|newconf|uci] +set opkg.defaults='opkg' 
-opkg upgr [ai|oi] +set opkg.defaults.import='/etc/backup/installed_packages.txt' 
-opkg export [ai|au|ri|wr|wi|or|oi|ur|ui|pr|pi] +set opkg.defaults.restore='init main' 
-opkg uci [get|set|init]+set opkg.defaults.rollback='main' 
 +set opkg.defaults.upgr='ai' 
 +set opkg.defaults.export='ai' 
 +set opkg.defaults.proc='--force-depends' 
 +set opkg.defaults.reinstall='--force-reinstall' 
 +set opkg.defaults.newconf='/etc'
 EOI EOI
 } }
  
-opkg_import() { +opkg_uci() { 
-local OPKG_TYPE +local OPKG_OPT="${1:-${OPKG_UCI}}
-if grep -q -e "^overlayfs:" /etc/mtab +local OPKG_OPT="${OPKG_OPT:-main}
-then OPKG_TYPE="overlay+if ! uci -q get opkg > /dev/null 
-else OPKG_TYPE="unknown"+then opkg init
 fi fi
-if [ -e "${OPKG_ARG}" ] +uci -q batch << EOI 
-then sed -n -e "s/\s${OPKG_TYPE}$/\tipkg/p" "${OPKG_ARG}" \ +delete opkg.'${OPKG_OPT}' 
-| opkg uci set auto+set opkg.'${OPKG_OPT}'='opkg' 
 +$(sed -r -e "s/^(.*)\s(.*)$/
 +del_list opkg.'${OPKG_OPT}'.'\2'='\1'\n\ 
 +add_list opkg.'${OPKG_OPT}'.'\2'='\1'/"
 +commit opkg 
 +EOI 
 +
 + 
 +opkg_import() { 
 +local OPKG_OPT="${1:-${OPKG_UCI}}" 
 +if [ -e "${OPKG_OPT}" ] 
 +then sed -n -r -e "s/\s(overlay|unknown)$/
 +\tipkg/p" "${OPKG_OPT}" \ 
 +| opkg uci main
 fi fi
 } }
Line 88: Line 105:
 local OPKG_UR="$(opkg export ur)" local OPKG_UR="$(opkg export ur)"
 local OPKG_UI="$(opkg export ui)" local OPKG_UI="$(opkg export ui)"
-{+if uci -q get fstab.rwm > /dev/null \ 
 +&& grep -q -e "\s/rwm\s" /etc/mtab 
 +then {
 sed -e "s/$/\trpkg/" "${OPKG_WR}" sed -e "s/$/\trpkg/" "${OPKG_WR}"
 sed -e "s/$/\tipkg/" "${OPKG_WI}" sed -e "s/$/\tipkg/" "${OPKG_WI}"
-} | opkg uci set rwm+} | opkg uci init 
 +fi
 { {
 sed -e "s/$/\trpkg/" "${OPKG_UR}" sed -e "s/$/\trpkg/" "${OPKG_UR}"
 sed -e "s/$/\tipkg/" "${OPKG_UI}" sed -e "s/$/\tipkg/" "${OPKG_UI}"
-} | opkg uci set "${OPKG_ARG}"+} | opkg uci main
 rm -f "${OPKG_WR}" "${OPKG_WI}" "${OPKG_UR}" "${OPKG_UI}" rm -f "${OPKG_WR}" "${OPKG_WI}" "${OPKG_UR}" "${OPKG_UI}"
 } }
  
 opkg_restore() { opkg_restore() {
-local OPKG_OPT="${OPKG_ARG}"+local OPKG_OPT="${1:-${OPKG_UCI}}" 
 +local OPKG_CONF="${OPKG_OPT}" 
 +for OPKG_CONF in ${OPKG_CONF} 
 +do
 local OPKG_AI="$(opkg export ai)" local OPKG_AI="$(opkg export ai)"
 local OPKG_PR="$(opkg export pr)" local OPKG_PR="$(opkg export pr)"
Line 109: Line 132:
 | opkg proc install | opkg proc install
 rm -f "${OPKG_AI}" "${OPKG_PR}" "${OPKG_PI}" rm -f "${OPKG_AI}" "${OPKG_PR}" "${OPKG_PI}"
 +done
 } }
  
 opkg_rollback() { opkg_rollback() {
-local OPKG_OPT="${OPKG_ARG}"+local OPKG_OPT="${1:-${OPKG_UCI}}" 
 +local OPKG_CONF="${OPKG_OPT}"
 local OPKG_UR="$(opkg export ur)" local OPKG_UR="$(opkg export ur)"
 local OPKG_UI="$(opkg export ui)" local OPKG_UI="$(opkg export ui)"
 local OPKG_PR="$(opkg export pr)" local OPKG_PR="$(opkg export pr)"
 local OPKG_PI="$(opkg export pi)" local OPKG_PI="$(opkg export pi)"
-opkg restore "${OPKG_ARG}"+if uci -q get opkg."${OPKG_CONF}" > /dev/null 
 +then opkg restore "${OPKG_CONF}"
 grep -v -x -f "${OPKG_PI}" "${OPKG_UI}" \ grep -v -x -f "${OPKG_PI}" "${OPKG_UI}" \
 | opkg proc remove | opkg proc remove
 grep -v -x -f "${OPKG_PR}" "${OPKG_UR}" \ grep -v -x -f "${OPKG_PR}" "${OPKG_UR}" \
 | opkg proc install | opkg proc install
 +fi
 rm -f "${OPKG_UR}" "${OPKG_UI}" "${OPKG_PR}" "${OPKG_PI}" rm -f "${OPKG_UR}" "${OPKG_UI}" "${OPKG_PR}" "${OPKG_PI}"
 } }
  
 opkg_upgr() { opkg_upgr() {
-case "${OPKG_ARG}" in +local OPKG_OPT="${1:-${OPKG_UCI}}" 
-(ai|oi) opkg_"${OPKG_CMD}"_path ;;+case "${OPKG_OPT}" in 
 +(ai|oi) opkg_"${OPKG_CMD}"_type ;;
 esac | opkg proc upgrade esac | opkg proc upgrade
 } }
  
-opkg_upgr_path() {+opkg_upgr_type() {
 local OPKG_AI="$(opkg export ai)" local OPKG_AI="$(opkg export ai)"
 local OPKG_OI="$(opkg export oi)" local OPKG_OI="$(opkg export oi)"
 local OPKG_AU="$(opkg export au)" local OPKG_AU="$(opkg export au)"
-case "${OPKG_ARG::1}" in+case "${OPKG_OPT::1}" in
 (a) grep -x -f "${OPKG_AI}" "${OPKG_AU}" ;; (a) grep -x -f "${OPKG_AI}" "${OPKG_AU}" ;;
 (o) grep -x -f "${OPKG_OI}" "${OPKG_AU}" ;; (o) grep -x -f "${OPKG_OI}" "${OPKG_AU}" ;;
Line 143: Line 171:
  
 opkg_export() { opkg_export() {
-local OPKG_EXP="$(mktemp -t opkg.XXXXXX)" +local OPKG_OPT="${1:-${OPKG_UCI}}" 
-case "${OPKG_ARG}" in+local OPKG_TEMP="$(mktemp -t opkg.XXXXXX)" 
 +case "${OPKG_OPT}" in
 (ai|au) opkg_"${OPKG_CMD}"_cmd ;; (ai|au) opkg_"${OPKG_CMD}"_cmd ;;
-(ri|wr|wi|or|oi) opkg_"${OPKG_CMD}"_path ;;+(ri|wr|wi|or|oi) opkg_"${OPKG_CMD}"_type ;;
 (ur|ui) opkg_"${OPKG_CMD}"_run ;; (ur|ui) opkg_"${OPKG_CMD}"_run ;;
 (pr|pi) opkg_"${OPKG_CMD}"_uci ;; (pr|pi) opkg_"${OPKG_CMD}"_uci ;;
-esac > "${OPKG_EXP}" +esac > "${OPKG_TEMP}" 
-cat << EOI +echo "${OPKG_TEMP}"
-${OPKG_EXP} +
-EOI+
 } }
  
 opkg_export_cmd() { opkg_export_cmd() {
-case "${OPKG_ARG:1}" in+local OPKG_TYPE 
 +case "${OPKG_OPT:1}" in
 (i) OPKG_TYPE="installed" ;; (i) OPKG_TYPE="installed" ;;
 (u) OPKG_TYPE="upgradable" ;; (u) OPKG_TYPE="upgradable" ;;
Line 164: Line 192:
 } }
  
-opkg_export_path() {+opkg_export_type() {
 local OPKG_INFO="/usr/lib/opkg/info" local OPKG_INFO="/usr/lib/opkg/info"
 local OPKG_TYPE local OPKG_TYPE
-case "${OPKG_ARG::1}" in+case "${OPKG_OPT::1}" in
 (r) OPKG_INFO="/rom${OPKG_INFO}" ;; (r) OPKG_INFO="/rom${OPKG_INFO}" ;;
 (w) OPKG_INFO="/rwm/upper${OPKG_INFO}" ;; (w) OPKG_INFO="/rwm/upper${OPKG_INFO}" ;;
 (o) OPKG_INFO="/overlay/upper${OPKG_INFO}" ;; (o) OPKG_INFO="/overlay/upper${OPKG_INFO}" ;;
 esac esac
-case "${OPKG_ARG:1}" in+case "${OPKG_OPT:1}" in
 (r) OPKG_TYPE="c" ;; (r) OPKG_TYPE="c" ;;
 (i) OPKG_TYPE="f" ;; (i) OPKG_TYPE="f" ;;
Line 184: Line 212:
 local OPKG_AI="$(opkg export ai)" local OPKG_AI="$(opkg export ai)"
 local OPKG_RI="$(opkg export ri)" local OPKG_RI="$(opkg export ri)"
-case "${OPKG_ARG:1}" in+case "${OPKG_OPT:1}" in
 (r) grep -v -x -f "${OPKG_AI}" "${OPKG_RI}" ;; (r) grep -v -x -f "${OPKG_AI}" "${OPKG_RI}" ;;
 (i) grep -v -x -f "${OPKG_RI}" "${OPKG_AI}" ;; (i) grep -v -x -f "${OPKG_RI}" "${OPKG_AI}" ;;
Line 193: Line 221:
 opkg_export_uci() { opkg_export_uci() {
 local OPKG_TYPE local OPKG_TYPE
-case "${OPKG_ARG:1}" in+case "${OPKG_OPT:1}" in
 (r) OPKG_TYPE="rpkg" ;; (r) OPKG_TYPE="rpkg" ;;
 (i) OPKG_TYPE="ipkg" ;; (i) OPKG_TYPE="ipkg" ;;
 esac esac
-uci -q get opkg."${OPKG_OPT}"."${OPKG_TYPE}" \+uci -q get opkg."${OPKG_CONF}"."${OPKG_TYPE}" \
 | sed -e "s/\s/\n/g" | sed -e "s/\s/\n/g"
 } }
  
 opkg_proc() { opkg_proc() {
 +local OPKG_OPT="${OPKG_UCI}"
 local OPKG_CMD="${1:?}" local OPKG_CMD="${1:?}"
 local OPKG_PKG local OPKG_PKG
 while read -r OPKG_PKG while read -r OPKG_PKG
-do +do opkg "${OPKG_CMD}" "${OPKG_PKG}" ${OPKG_OPT}
-if [ "${OPKG_PKG%%-*}" = "dnsmasq" ] \ +
-&& [ "${OPKG_CMD}" = "remove"+
-then /etc/init.d/dnsmasq stop +
-fi +
-opkg "${OPKG_CMD}" "${OPKG_PKG}" ${OPKG_OPT} +
-if [ "${OPKG_PKG%%-*}" = "grep"+
-then hash -r +
-fi+
 done done
 } }
  
 opkg_reinstall() { opkg_reinstall() {
 +local OPKG_OPT="${OPKG_UCI}"
 opkg install "${@}" ${OPKG_OPT} opkg install "${@}" ${OPKG_OPT}
 } }
  
-opkg_newconf() { +opkg_altlink() { 
-find "${OPKG_ARG}" -name "*-opkg"+sed -n -e "/^Alternatives:/
 +{s/^\S*\s*//;s/,\s/\n/gp}" /usr/lib/opkg/status \ 
 +| sort -n -t ":" \ 
 +| while IFS=":" read -r OPKG_PRIO OPKG_LINK OPKG_ALT 
 +do ln -f -s "${OPKG_ALT}" "${OPKG_LINK}" 
 +done
 } }
  
-opkg_uci() { +opkg_newconf() { 
-case "${OPKG_ARG}" in +local OPKG_OPT="${1:-${OPKG_UCI}}" 
-(get|set|init) opkg_"${OPKG_CMD}"_"${OPKG_ARG}" ;; +find "${OPKG_OPT}-name "*-opkg"
-esac +
-+
- +
-opkg_uci_get() { +
-local OPKG_UCI="$(uci -q get opkg.defaults."${1}")" +
-local OPKG_UCI="${2:-${OPKG_UCI}}" +
-cat << EOI +
-${OPKG_UCI} +
-EOI +
-+
- +
-opkg_uci_set() { +
-opkg uci init +
-uci -q batch << EOI +
-delete opkg.${OPKG_ARG} +
-set opkg.${OPKG_ARG}=opkg +
-$(sed -r -e "s/^(.*)\s(.*)$/+
-del_list opkg.${OPKG_ARG}.\2=\1\n\ +
-add_list opkg.${OPKG_ARG}.\2=\1/"+
-commit opkg +
-EOI +
-+
- +
-opkg_uci_init() { +
-if ! uci -q get opkg > /dev/null +
-then uci -q batch << EOI +
-import opkg +
-set opkg.defaults=opkg +
-set opkg.defaults.import=/etc/backup/installed_packages.txt +
-set opkg.defaults.save=auto +
-set opkg.defaults.restore=auto +
-set opkg.defaults.rollback=auto +
-set opkg.defaults.upgr=ai +
-set opkg.defaults.export=ai +
-set opkg.defaults.proc=--force-depends +
-set opkg.defaults.reinstall=--force-reinstall +
-set opkg.defaults.newconf=/etc +
-set opkg.custom=opkg +
-EOI +
-fi+
 } }
 EOF EOF
 . /etc/profile.d/opkg.sh . /etc/profile.d/opkg.sh
  
-Restore packages automatically+Configure hotplug
 mkdir -p /etc/hotplug.d/online mkdir -p /etc/hotplug.d/online
 cat << "EOF" > /etc/hotplug.d/online/50-opkg-restore cat << "EOF" > /etc/hotplug.d/online/50-opkg-restore
-if [ ! -e /etc/opkg-restore ] \+OPKG_CONF="$(uci -q get opkg.defaults.restore)" 
 +for OPKG_CONF in ${OPKG_CONF} 
 +do if [ ! -e /etc/opkg-restore-"${OPKG_CONF}" ] \
 && lock -n /var/lock/opkg-restore \ && lock -n /var/lock/opkg-restore \
 +&& sleep 10 \
 && opkg update && opkg update
 then . /etc/profile.d/opkg.sh then . /etc/profile.d/opkg.sh
-if uci -q get fstab.rwm /dev/null +opkg restore "${OPKG_CONF}" &> \ 
-&& ! grep -q -e "\s/rwm\s" /etc/mtab +/var/log/opkg-restore-"${OPKG_CONF}" 
-then opkg restore rwm +touch /etc/opkg-restore-"${OPKG_CONF}"
-else opkg restore +
-fi +
-touch /etc/opkg-restore+
 lock -u /var/lock/opkg-restore lock -u /var/lock/opkg-restore
 reboot reboot
 +break
 fi fi
 +done
 EOF EOF
 cat << "EOF" >> /etc/sysupgrade.conf cat << "EOF" >> /etc/sysupgrade.conf
Line 306: Line 295:
 opkg rollback opkg rollback
  
-# Set up a custom Opkg profile +# Set up Opkg profiles 
-uci set opkg.defaults.restore="custom" +uci set opkg.defaults.restore="init custom" 
-uci -q delete opkg.custom.rpkg+uci set opkg.init="opkg" 
 +uci add_list opkg.init.ipkg="losetup" 
 +uci add_list opkg.init.ipkg="parted" 
 +uci add_list opkg.init.ipkg="resize2fs" 
 +uci set opkg.custom="opkg"
 uci add_list opkg.custom.rpkg="dnsmasq" uci add_list opkg.custom.rpkg="dnsmasq"
 uci add_list opkg.custom.rpkg="ppp" uci add_list opkg.custom.rpkg="ppp"
-uci -q delete opkg.custom.ipkg 
 uci add_list opkg.custom.ipkg="curl" uci add_list opkg.custom.ipkg="curl"
 uci add_list opkg.custom.ipkg="diffutils" uci add_list opkg.custom.ipkg="diffutils"
Line 317: Line 309:
 uci commit opkg uci commit opkg
  
-# Check hotplug log +# Check Opkg log 
-logread -e hotplug+tail -f /var/log/opkg-*
  
 # Upgrade packages # Upgrade packages
 opkg update opkg update
 opkg upgr opkg upgr
 +
 +# Maintenance
 +opkg altlink
 +opkg newconf
 </code> </code>
  
 ===== Automated ===== ===== Automated =====
 <code bash> <code bash>
-uclient-fetch -O opkg-extras.sh "https://openwrt.org/_export/code/docs/guide-user/advanced/opkg_extras?codeblock=0"+wget -U "" -O opkg-extras.sh "https://openwrt.org/_export/code/docs/guide-user/advanced/opkg_extras?codeblock=0"
 . ./opkg-extras.sh . ./opkg-extras.sh
 </code> </code>
  
  • Last modified: 2023/11/30 19:06
  • by vgaetera