base-files: add migration information for APK
authorPaul Spooren <mail@aparcar.org>
Wed, 27 Nov 2024 16:09:30 +0000 (17:09 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 27 Nov 2024 21:08:28 +0000 (22:08 +0100)
If the `apk` package manager is installed, show a table of common
commands to deal with the system.

Signed-off-by: Paul Spooren <mail@aparcar.org>
package/base-files/files/etc/profile

index 76b149b9fae5e5911ce1a1fb6555b02a5a7a0794..e892a5a605fd646cd2c8d70b5121c35bf17e3520 100644 (file)
@@ -38,3 +38,24 @@ in order to prevent unauthorized SSH logins.
 --------------------------------------------------
 EOF
 fi
+
+if [ -x /usr/bin/apk ]; then
+cat << EOF
+
+ OpenWrt recently switched to the "apk" package manger!
+
+ OPKG Command           APK Equivalent      Description
+ ------------------------------------------------------------------
+ opkg install <pkg>     apk add <pkg>       Install a package
+ opkg remove <pkg>      apk del <pkg>       Remove a package
+ opkg upgrade           apk upgrade         Upgrade all packages
+ opkg files <pkg>       apk info -L <pkg>   List package contents
+ opkg list-installed    apk info            List installed packages
+ opkg update            apk update          Update package lists
+ opkg search <pkg>      apk search <pkg>    Search for packages
+ ------------------------------------------------------------------
+
+For more https://openwrt.org/docs/guide-user/additional-software/opkg-to-apk-cheatsheet
+
+EOF
+fi