# return the password in the variable they provided.
eval $varname="$passwd"
-#echo varname is: $varname
-#echo new value of that variable is ${!varname}
}
# stores a password into a password file. the password file should be the
fi
echo "$passwd" > "$passfile"
- test_or_die "writing password into the file $passfile"
+ exit_on_error "writing password into the file $passfile"
chown root:root "$passfile"
- test_or_die "chowning the password file to root ownership for: $passfile"
+ exit_on_error "chowning the password file to root ownership for: $passfile"
chmod 600 "$passfile"
- test_or_die "restricting permissions on password file for: $passfile"
+ exit_on_error "restricting permissions on password file for: $passfile"
}
# reads a password from the console, without echoing the letters when they
stty $stty_orig
# return the password in the variable they provided.
eval $varname="$the_passwd"
-#echo varname is: $varname
-#echo new value of that variable is ${!varname}
}