Skip to content

Commit 19dcbc7

Browse files
committed
styled zfs passhrase and added full qualified path for local configuration
1 parent 2873b06 commit 19dcbc7

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

scripts/zfs/install/01-configure.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ function zfs_passphrase ()
103103
# Generate key
104104
print ":: Set ZFS passphrase"
105105
read -r -p "> ZFS passphrase: " -s pass
106+
echo ""
106107
print " Please confirm your passphrase"
107108
read -r -p "> ZFS passphrase: " -s pass2
109+
echo ""
108110

109111
if [[ "${pass}" == "${pass2}" ]];
110112
then
@@ -235,6 +237,7 @@ function copy_zpool_cache ()
235237

236238
function _main ()
237239
{
240+
local PATH_TO_THIS_SCRIPT=$(cd `dirname ${0}` && pwd)
238241
tests
239242

240243
print ":: Is this the first install or a second install to dualboot?"
@@ -281,7 +284,7 @@ function _main ()
281284
# By sourcing an existing file before asking the question, we can easily extend the questions/variables
282285
# or use pre configured install.conf files but configure all missing variables
283286

284-
install_conf="install.conf"
287+
install_conf="${PATH_TO_THIS_SCRIPT}/install.conf"
285288

286289
if [[ -f ${install_conf} ]];
287290
then

scripts/zfs/install/02-install.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,22 @@ function print ()
3737

3838
function _main ()
3939
{
40+
local PATH_TO_THIS_SCRIPT=$(cd `dirname ${0}` && pwd)
41+
42+
local PATH_TO_THE_LOCAL_INSTALL_CONF="${PATH_TO_THIS_SCRIPT}/install.conf"
43+
local PATH_TO_THE_DIST_INSTALL_CONF="${PATH_TO_THIS_SCRIPT}/install.dist.conf"
44+
4045
#bo: sourcing install configuration files
41-
if [[ -f install.dist.conf ]];
46+
if [[ -f "${PATH_TO_THE_DIST_INSTALL_CONF}" ]];
4247
then
4348
echo ":: Sourcing >>install.dist.conf<<."
44-
. install.dist.conf
49+
. "${PATH_TO_THE_DIST_INSTALL_CONF}"
4550
fi
4651

47-
if [[ -f install.conf ]];
52+
if [[ -f "${PATH_TO_THE_LOCAL_INSTALL_CONF}" ]];
4853
then
4954
echo ":: Sourcing >>install.conf<<."
50-
. install.conf
55+
. "${PATH_TO_THE_LOCAL_INSTALL_CONF}"
5156
fi
5257
#bo: sourcing install configuration files
5358

0 commit comments

Comments
 (0)