Is there a way to achieve the subject ^^^
Plain motd with some trivial shell scripting/ sourcing, you will find a way (not to say that there would be spoilers, if you had spent 30s on investigating the topic yourself).
Pointing you directly to the answer, in case the old acronym 'motd' is cryptic.
It is just a profile snippet in 25.12. (already removed from the newer main/master snapshots, but the file may survive in the sysupgrade backups)
rm /etc/profile.d/apk-cheatsheet.sh
You can also “hush” the cheat sheet with:
touch /etc/profile.d/apk-cheatsheet.hush
Better to comment out each line
if you haven't modified any thing in /etc/profile
do : rm /overlay/upper/etc/profile
then reboot.
Deleting the profile file from overlay will not work, as the advice text is in the firmware itself, not in the overlay (=changes made by user).
And it is not in the main profile file /etc/profile, but in a separate add-on snippet /etc/profile.d/apk-cheatsheet.sh (in the /etc/profile.d/ directory):
right, that depends on which Openwrt firmware.
If the new release already cancelled apk cheatsheet banner,
remove it from overlay which carry from old release.
Otherwise edit 'profile' on your own.
I am using snapshot.
/etc/profile is like that, the cheatsheet was inside.
[ -e /tmp/.failsafe ] && export FAILSAFE=1
[ -f /etc/banner ] && cat /etc/banner
[ -n "$FAILSAFE" ] && cat /etc/banner.failsafe
grep -Fsq '/ overlay ro,' /proc/mounts && {
echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
echo 'Please try to remove files from /overlay/upper/... and reboot!'
}
export PATH="/usr/sbin:/usr/bin:/sbin:/bin"
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
export HOME=${HOME:-/root}
export PS1='\u@\h:\w\$ '
export ENV=/etc/shinit
case "$TERM" in
xterm*|rxvt*)
export PS1='\[\e]0;\u@\h: \w\a\]'$PS1
;;
esac
[ -n "$FAILSAFE" ] || {
for FILE in /etc/profile.d/*.sh; do
[ -e "$FILE" ] && . "$FILE"
done
unset FILE
}
if ( grep -qs '^root::' /etc/shadow && \
[ -z "$FAILSAFE" ] )
then
cat << EOF
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
EOF
fi
if [ -x /usr/bin/apk ]; then
cat << EOF
OpenWrt recently switched to the "apk" package manager!
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
Yeah, you are right: if you "keep settings" in sysupgrade, you may have kept the old profile version with outdated contents although the new main/master snapshot images have already dropped it, and so you may have the cheatsheet still there..
The new default for main profile file and profile.d dir contents are in /rom/etc/ . The proper way would be to copy them from there to /etc, but your way of deleting the files from overlay/ (and rebooting) should also work.