Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:additional-software:opkg [2023/03/28 07:58] – [Local repository] vgaetera | docs:guide-user:additional-software:opkg [2023/04/03 00:34] – [Local repository] update vgaetera | ||
|---|---|---|---|
| Line 305: | Line 305: | ||
| ==== Verbose opkg update ==== | ==== Verbose opkg update ==== | ||
| <code bash> | <code bash> | ||
| + | # Save the script | ||
| cat << " | cat << " | ||
| #!/bin/sh | #!/bin/sh | ||
| Line 319: | Line 320: | ||
| done < / | done < / | ||
| EOF | EOF | ||
| - | chmod +x ./opkg-update.sh | + | chmod +x opkg-update.sh |
| + | |||
| + | # Run the script | ||
| ./ | ./ | ||
| </ | </ | ||
| Line 349: | Line 352: | ||
| done | done | ||
| EOF | EOF | ||
| - | chmod +x ./opkg-rm-pkg-deps.sh | + | chmod +x opkg-rm-pkg-deps.sh |
| + | </ | ||
| + | |||
| + | <code bash> | ||
| # Run the script | # Run the script | ||
| - | ./ | + | ./ |
| # Reboot to make the free space visible | # Reboot to make the free space visible | ||
| Line 373: | Line 379: | ||
| opkg install rsync | opkg install rsync | ||
| - | # Create a local repository | + | # Save the script |
| + | cat << " | ||
| + | #!/bin/sh | ||
| . / | . / | ||
| + | REPO_LOCAL=" | ||
| REPO_URL=" | REPO_URL=" | ||
| - | REPO_LOCAL="file:///${ID}/" | + | case "${VERSION_ID}" in |
| - | REPO_DIR=" | + | (snapshot) REPO_DIR=" |
| + | (*) REPO_DIR=" | ||
| + | esac | ||
| REPO_CORE=" | REPO_CORE=" | ||
| REPO_PKGS=" | REPO_PKGS=" | ||
| - | for REPO_DIR in ${REPO_CORE} ${REPO_PKGS} | + | for REPO_DIR in "${REPO_CORE}" "${REPO_PKGS}" |
| - | do mkdir -p ${REPO_LOCAL# | + | do mkdir -p "${REPO_LOCAL# |
| - | + | rsync --bwlimit="8M" | |
| - | rsync --bwlimit=8M --del -r -t -v \ | + | "${REPO_URL/ |
| - | ${REPO_URL/ | + | "${REPO_LOCAL# |
| - | ${REPO_LOCAL# | + | |
| done | done | ||
| + | EOF | ||
| + | chmod +x opkg-sync-local-repo.sh | ||
| - | # Configure Opkg | + | # Run the script |
| + | ./ | ||
| + | |||
| + | # Configure Opkg to use local repo | ||
| + | . / | ||
| + | REPO_LOCAL=" | ||
| + | REPO_URL=" | ||
| sed -i -e " | sed -i -e " | ||
| Line 396: | Line 414: | ||
| # Configure Opkg on the clients | # Configure Opkg on the clients | ||
| . / | . / | ||
| - | REPO_URL=" | ||
| REPO_LOCAL=" | REPO_LOCAL=" | ||
| + | REPO_URL=" | ||
| sed -i -e " | sed -i -e " | ||
| </ | </ | ||