asterisk variables in FAI debug mode

Martin Krämer mk.maddin at gmail.com
Thu Aug 17 12:55:13 CEST 2017


Thanks for the diff and fast reply :)

On Aug 17, 2017 12:49, "Thomas Lange" <lange at informatik.uni-koeln.de> wrote:

> >>>>> On Thu, 17 Aug 2017 11:13:23 +0200, Martin Krämer <
> mk.maddin at gmail.com> said:
>
>     > is there a way I can make custom variables not readable in FAI.log
> like the ROOTPW variable?
> Currently no. But the next FAI version will support this.
> Here's the diff, I just created. All Variable definitions ending in PW
> will be obfuscated. Thanks for the idea.
>
> diff --git a/lib/subroutines b/lib/subroutines
> index fecd3797..6519b437 100755
> --- a/lib/subroutines
> +++ b/lib/subroutines
> @@ -462,7 +462,7 @@ task_defvar() {
>              # show only lines with ++, we cannot use a pipe, since it
> would call
>              # _devfar in a subprocess. Then, variables are not defined
>              _defvar $class.var > $svar 2>&1
> -            grep ^++ $svar|sed -e 's/ROOTPW=.*/ROOTPW=XXXXXXXXXXXXX/'
> +            grep ^++ $svar| sed -e 's/\(.*PW\)=.*$/\1=XXXXXXXXXXXXX/'
>              rm $svar
>          fi
>      done
>
> --
> regards Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20170817/c2f772f2/attachment.html>


More information about the linux-fai mailing list