diff options
author | Konstantin Demin <rockdrilla@gmail.com> | 2024-01-09 03:40:02 +0300 |
---|---|---|
committer | Rui Salvaterra <rsalvaterra@gmail.com> | 2024-02-09 09:13:05 +0000 |
commit | a97e0dad6ef90d9cfee288a9f2035b33353c7ca0 (patch) | |
tree | dd09ebb192326dad8cb0fdd4742dde28d503cded /package | |
parent | ff1ccd85e88d54724ea9c034ec355e7805356fb2 (diff) | |
download | openwrt-a97e0dad6ef90d9cfee288a9f2035b33353c7ca0.tar.gz openwrt-a97e0dad6ef90d9cfee288a9f2035b33353c7ca0.tar.bz2 openwrt-a97e0dad6ef90d9cfee288a9f2035b33353c7ca0.zip |
dropbear: 'rsakeyfile' -> 'keyfile' transition
end users should have done this since OpenWrt 19.07.
if they didn't do this yet - perform auto-transition.
schedule 'rsakeyfile' removal for next year release.
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Diffstat (limited to 'package')
-rwxr-xr-x | package/network/services/dropbear/files/dropbear.init | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init index a40b5f7bae..18273e63d0 100755 --- a/package/network/services/dropbear/files/dropbear.init +++ b/package/network/services/dropbear/files/dropbear.init @@ -168,13 +168,16 @@ dropbear_instance() [ -n "${ForceCommand}" ] && procd_append_param command -c "${ForceCommand}" [ "${RootPasswordAuth}" -eq 0 ] && procd_append_param command -g [ "${RootLogin}" -eq 0 ] && procd_append_param command -w + config_list_foreach "$1" 'keyfile' hk_config__keyfile if [ -n "${rsakeyfile}" ]; then - logger -t ${NAME} -p daemon.warn \ - "option 'rsakeyfile' is considered to be deprecated and" \ - "will be removed in future releases, use 'keyfile' instead" + logger -s -t "${NAME}" -p daemon.crit \ + "Option 'rsakeyfile' is considered to be DEPRECATED and will be REMOVED in future releases, use 'keyfile' list instead" + sed -i.before-upgrade -E -e 's/option(\s+)rsakeyfile/list keyfile/' \ + "/etc/config/${NAME}" + logger -s -t "${NAME}" -p daemon.crit \ + "Auto-transition 'option rsakeyfile' => 'list keyfile' in /etc/config/${NAME} is done, please verify your configuration" hk_config 'rsakeyfile' "${rsakeyfile}" fi - config_list_foreach "$1" "keyfile" hk_config__keyfile [ -n "${BannerFile}" ] && procd_append_param command -b "${BannerFile}" append_ports "${ipaddrs}" "${Port}" [ "${IdleTimeout}" -ne 0 ] && procd_append_param command -I "${IdleTimeout}" |