[PATCH] fff-support: Add device name and firmware version to MOTD

Fabian Bläse fabian at blaese.de
Sa Mai 25 19:51:12 CEST 2019


Kann man denke ich so machen. Ich würde aber die Leerzeilen weglassen.

Reviewed-by: Fabian Bläse <fabian at blaese.de>

Fabian

On 23.04.19 16:27, Adrian Schmutzler wrote:
> This adds a line containing the device name and the current
> firmware version to the MOTD shown after logging in via SSH, e.g.
> 
>> TP-Link TL-WR1043N/ND v2 @ jubtl9_20190320
> 
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> 
> ---
> 
> I consider this very convenient myself, maybe others are also
> interested.
> ---
>  src/packages/fff/fff-support/Makefile                            | 2 +-
>  .../fff/fff-support/files/etc/uci-defaults/80-banner-info        | 9 +++++++++
>  2 files changed, 10 insertions(+), 1 deletion(-)
>  create mode 100644 src/packages/fff/fff-support/files/etc/uci-defaults/80-banner-info
> 
> diff --git a/src/packages/fff/fff-support/Makefile b/src/packages/fff/fff-support/Makefile
> index 56e35740..2fc74b0c 100644
> --- a/src/packages/fff/fff-support/Makefile
> +++ b/src/packages/fff/fff-support/Makefile
> @@ -1,7 +1,7 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=fff-support
> -PKG_RELEASE:=2
> +PKG_RELEASE:=3
>  
>  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
>  
> diff --git a/src/packages/fff/fff-support/files/etc/uci-defaults/80-banner-info b/src/packages/fff/fff-support/files/etc/uci-defaults/80-banner-info
> new file mode 100644
> index 00000000..5ffef084
> --- /dev/null
> +++ b/src/packages/fff/fff-support/files/etc/uci-defaults/80-banner-info
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +# Copyright 2018 Adrian Schmutzler
> +# License GPLv3
> +
> +. /etc/firmware_release
> +
> +echo "" >> /etc/banner
> +echo "> $(cat /tmp/sysinfo/model 2>/dev/null) @ $FIRMWARE_VERSION" >> /etc/banner
> +echo "" >> /etc/banner
> 

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 833 bytes
Beschreibung: OpenPGP digital signature
URL         : <https://{'listname': 'franken-dev-freifunk.net', 'hostname': 'lists.freifunk.net'}/pipermail/franken-dev-freifunk.net/attachments/20190525/d6e10ae1/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev