summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-12-20 15:34:47 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-12-20 15:34:47 +0100
commite8291396bf3879140fd7032414a5d417975152c9 (patch)
tree22fe786e06bff928fb43244f2fcf931e70451627
parent0111fdd1d6dbf6c988eb9a742f4934ead887d2d6 (diff)
variable name & logic fixes
-rw-r--r--examples/deployconfig-dieter6
-rw-r--r--src/core/procedures/automatic10
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/deployconfig-dieter b/examples/deployconfig-dieter
index 1c334a2..6c9a909 100644
--- a/examples/deployconfig-dieter
+++ b/examples/deployconfig-dieter
@@ -5,7 +5,7 @@ var_RUNTIME_PACKAGES="svn"
DEPLOY_CLASS=desktop-a7n8x
HOSTNAME=dieter-ws
-SVN_USER=dieter
+SVN_USERNAME=dieter
SVN_PASSWORD=
SVN_BASE=https://192.168.1.2/svn/repos
@@ -16,8 +16,8 @@ phase_system+=(configure_home)
worker_fetch_configs ()
{
- svn export $SVN_BASE/ddm-configs/$TARGET_HOST/trunk/disks/.blockdata $RUNTIME_DIR || die_error "Could not svn export $SVN_BASE/ddm-configs/$TARGET_HOST/trunk/disks/.blockdata into $RUNTIME_DIR"
- svn export $SVN_BASE/ddm-configs/$TARGET_HOST/trunk/disks/.partitions $RUNTIME_DIR || die_error "Could not svn export $SVN_BASE/ddm-configs/$TARGET_HOST/trunk/disks/.partitions into $RUNTIME_DIR"
+ svn export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/disks/.blockdata $RUNTIME_DIR || die_error "Could not svn export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/disks/.blockdata into $RUNTIME_DIR"
+ svn export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/disks/.partitions $RUNTIME_DIR || die_error "Could not svn export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/disks/.partitions into $RUNTIME_DIR"
}
diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic
index 3f02832..f41d5a9 100644
--- a/src/core/procedures/automatic
+++ b/src/core/procedures/automatic
@@ -74,17 +74,17 @@ worker_runtime_settings ()
{
if check_is_in svn "$var_RUNTIME_PACKAGES"
then
- [ -n "$SVN_USERNAME" ] || ask_string "Please enter your svn username" && SVN_USERNAME=$ANSWER_STRING
- [ -n "$SVN_PASSWORD" ] || ask_password svn #TODO: if user entered incorrect password, the install process will just fail..
- [ -n "$SVN_BASE" ] || ask_string "What's the base path of your svn repo? (no ending /) " && SVN_BASE=$ANSWER_STRING
- [ -n "$DEPLOY_CLASS" ] || ask_string "Which hostclass are you installing? (optional)" '' 0 && DEPLOY_CLASS=$ANSWER_STRING
+ [ -z "$SVN_USERNAME" ] && ask_string "Please enter your svn username" && SVN_USERNAME=$ANSWER_STRING
+ [ -z "$SVN_PASSWORD" ] && ask_password svn #TODO: if user entered incorrect password, the install process will just fail..
+ [ -z "$SVN_BASE" ] && ask_string "What's the base path of your svn repo? (no ending /) " && SVN_BASE=$ANSWER_STRING
+ [ -z "$DEPLOY_CLASS" ] && ask_string "Which hostclass are you installing? (optional)" '' 0 && DEPLOY_CLASS=$ANSWER_STRING
SVN="svn --username $SVN_USERNAME --password $SVN_PASSWORD"
elif check_is_in moo "$var_RUNTIME_PACKAGES"
then
# Maybe more stuff later
true
fi
- [ -n "$HOSTNAME" ] || ask_string "Hostname of target system?" && HOSTNAME=$ANSWER_STRING
+ [ -z "$HOSTNAME" ] && ask_string "Hostname of target system?" && HOSTNAME=$ANSWER_STRING
}