Skip to content

Commit

Permalink
Merge pull request e-m-b-a#237 from BenediktMKuehne/versiondec-update
Browse files Browse the repository at this point in the history
openwrt identifier
  • Loading branch information
m-1-k-3 committed May 10, 2022
2 parents 3c87a60 + 721634b commit 55453f8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/bin_version_strings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ openssl;;bsd;"OpenSSL\ [0-9](\.[0-9]+)+?(-[a-z]+)?$";"sed -r 's/OpenSSL\ ([0-9](
openswan;;gplv2;"^Openswan\ [0-9](\.[0-9]+)+?$";"sed -r 's/Openswan\ ([0-9](\.[0-9]+)+?)$/openswan:\1/'";
openswan;;gplv2;"^Linux\ Openswan\ [0-9](\.[0-9]+)+?$";"sed -r 's/Linux\ Openswan\ ([0-9](\.[0-9]+)+?)$/openswan:\1/'";
openvpn;;gpl;"^OpenVPN\ [0-9](\.[0-9]+)+?\ ";"sed -r 's/OpenVPN\ ([0-9](\.[0-9]+)+?)\ .*/openvpn:\1/'";
# for future use / not yet used
# openwrt;;gpl;(OpenWrt)\ ([0-9]+\.[0-9]+\.[0-9])\ (r[0-9]+\-)([a-z0-9]+).*";sed -r 's/(OpenWrt)\ ([0-9]+\.[0-9]+\.[0-9])\ (r[0-9]+\-)([a-z0-9]+).*/openwrt:\2/'";
opkg;;unknown;"opkg\ version\ [0-9](\.[0-9]+)+?";"sed -r 's/opkg\ version\ ([0-9](\.[0-9]+)+?)/opkg:\1/'";
ospf6d;;unknown;"^ospf6d\ version\ [0-9](\.[0-9]+)+$";"sed -r 's/ospf6d\ version\ ([0-9](\.[0-9]+)+?)$/ospf6d:\1/'";
overlord;;unknown;"^overlord\ [0-9](\.[0-9]+)+?$";"sed -r 's/overlord\ ([0-9](\.[0-9]+)+?)$/overlord:\1/'";
Expand Down
1 change: 1 addition & 0 deletions config/distri_id.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
OpenWRT;/etc/banner;grep -a -o -E "KAMIKAZE.\(bleeding.edge..r[0-9]+\)";sort -u | sed -r 's/(KAMIKAZE) \(bleeding edge, (r[0-9]+)\)/OpenWRT \1 \2/'
OpenWRT;/etc/banner;grep -a -o -E "BACKFIRE.\(bleeding.edge..r[0-9]+\)";sort -u | sed -r 's/(BACKFIRE) \(bleeding edge, (r[0-9]+)\)/OpenWRT \1 \2/'
# Reboot (17.01.0-rc2, r3131-42f3c1f) -> LEDE
OpenWRT;/etc/openwrt_release;grep -a -o -E -e "^DISTRIB_ID=.*" -a -o -E -e "^DISTRIB_RELEASE=.*" -a -o -E -e "^DISTRIB_REVISION=.*";sort -u | tr '\n' ' ' | sed 's/DISTRIB_ID=//g' | sed 's/DISTRIB_RELEASE=//g' | sed 's/DISTRIB_REVISION=//g' | tr -d \'
os-release-Linux;/etc/os-release;grep -a -o -E -e "^NAME=.*" -a -o -E -e "^VERSION=.*";sort -u | tr '\n' ' ' | sed 's/NAME=//g' | sed 's/VERSION=//g' | tr -d \"
lsb-release-Linux;/etc/lsb-release;grep -a -o -E -e "^DISTRIB_ID=.*" -a -o -E -e "^DISTRIB_RELEASE=.*";sort -u | tr '\n' ' ' | sed 's/DISTRIB_ID=//g' | sed 's/DISTRIB_RELEASE=//g' | tr -d \"
#debian-Linux;/etc/debian-version;-a -o -E -e ".*";sort -u
Expand Down
2 changes: 2 additions & 0 deletions config/release_files.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ S*/uSE-release
*/issue
*/issue.net
*/image_sign
*/openwrt_release
*/openwrt_version
2 changes: 2 additions & 0 deletions modules/S06_distribution_identification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ get_csv_rule_distri() {
# see also: https://openwrt.org/about/history
VERSION_IDENTIFIER="$(echo "$VERSION_IDENTIFIER" | sed -r 's/(openwrt)\ (kamikaze)\ r1[4-8][0-9][0-9][0-9].*/\1:\2:8.09/')"
VERSION_IDENTIFIER="$(echo "$VERSION_IDENTIFIER" | sed -r 's/(openwrt)\ (backfire)\ r2[0-9][0-9][0-9][0-9].*/\1:\2:10.03/')"
# OpenWrt 18.06.2 r7676-cddd7b4c77
VERSION_IDENTIFIER="$(echo "$VERSION_IDENTIFIER" | sed -r 's/(openwrt)\ ([0-9]+\.[0-9]+\.[0-9])\ (r[0-9]+\-)([a-z0-9]+).*/openwrt:\2/')"
VERSION_IDENTIFIER="$(echo "$VERSION_IDENTIFIER" | sed -r 's/lede\ ([0-9]+\.[0-9]+\.[0-9]+)(-)?(rc[0-9])?.*/openwrt:\1:\3/')"
# d-link dir-300 v2.14b01
VERSION_IDENTIFIER="$(echo "$VERSION_IDENTIFIER" | sed -r 's/d-link\ (.*)\ v([0-9].[0-9]+[a-z][0-9]+)/dlink:\1_firmware:\2/')"
Expand Down

0 comments on commit 55453f8

Please sign in to comment.