On Sat, Feb 23, 2013 at 10:17:32AM +0100, Ralf Treinen wrote:
> On Fri, Feb 22, 2013 at 04:09:01PM -0800, Vagrant Cascadian wrote:
>
> > I haven't tested the following patch, but it should essentially resolve the
> > issue.
>
> Shouldn't one keep checking that the user doesn't enter empty values
> for USER and PASS ? I was thinking of a patch like this one:
>
> -------------------------------------------------------------------------
>
> --- config 2013-02-23 10:11:45.000000000 +0100
> +++ config.orig 2013-02-23 10:08:49.000000000 +0100
> @@ -2,6 +2,8 @@
>
> set -e
>
> +[ `echo $DEBIAN_FRONTEND | tr '[:upper:]' '[:lower:]'` = "noninteractive" ]
> && exit 0
> +
> . /usr/share/debconf/confmodule
>
> db_beginblock
> @@ -11,11 +13,8 @@
>
> db_go
>
> -USER=rinput
> db_get rinputd/username
> USER="$RET"
> -
> -PASS=DEFAULTPASSWD
> db_get rinputd/passwd
> PASS="$RET"
>
> ------------------------------------------------------------------------
That will still overwrite it with an empty value...
probably something more like:
db_get rinput/passwd
PASS="$RET"
if [ -z "$PASS" ]; then
db_set rinput/passwd "DEFAULTPASSWD"
fi
if [ -z "$USER" ]; then ...
db_set rinput/passwd "rinput"
fi
(i forget the exact syntax on db_set...)
> The question remains what to put in place of DEFAULTPASSWD.
You could generate a random password, if you really wanted to avoid a default
password...
live well,
vagrant
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]