summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorNico Dietrich2006-04-04 22:04:22 +0200
committerNico Dietrich2006-04-04 22:04:22 +0200
commitc9316dece9bc89cfa8601109ec263bd05742ca54 (patch)
tree00dc6c7c4837c90009fa84313568c5bba06f8926 /installer
parentonly diff if old file exists (diff)
downloadcore-c9316dece9bc89cfa8601109ec263bd05742ca54.tar.gz
core-c9316dece9bc89cfa8601109ec263bd05742ca54.tar.xz
core-c9316dece9bc89cfa8601109ec263bd05742ca54.zip
next fix
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@157 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r--installer/.config.default2
-rwxr-xr-xinstaller/ld4-inst11
2 files changed, 6 insertions, 7 deletions
diff --git a/installer/.config.default b/installer/.config.default
index 1521251d..a9af67eb 100644
--- a/installer/.config.default
+++ b/installer/.config.default
@@ -1,2 +1,2 @@
tftpbootdir="/tftpboot"
-
+overwrite_configs="Y"
diff --git a/installer/ld4-inst b/installer/ld4-inst
index 93bfcaff..69815d74 100755
--- a/installer/ld4-inst
+++ b/installer/ld4-inst
@@ -127,11 +127,10 @@ configure() {
fi
. .config
- overwrite_configs="yes"
- echo -n "Overwrite server configs (Y) or write *.new files (n)? [Y/n] "
- read userinput
- if [ "$userinput" = "no" -o "$userinput" = "n" -o \
- "$userinput" = "N" -o "$userinput" = "No" ] ; then
+ [ -z $overwrite_configs ] && overwrite_configs="y"
+ ask "Overwrite server configs (Y) or write *.new files (n)? [Y/n] " overwrite_configs $overwrite_configs
+ if [ "$overwrite_configs" = "no" -o "$overwrite_configs" = "n" -o \
+ "$overwrite_configs" = "N" -o "$overwrite_configs" = "No" ] ; then
overwrite_configs="no"
fi
@@ -375,7 +374,7 @@ setup_server () {
set -- $cfile
# check if file changed
- lastfile=`ls -lt ${dxs_conf}/${1}* | awk '{print $8}'| sed -n "2,2p"`
+ lastfile=`ls -lt ${dxs_conf}/${1}* | sed -n "2,2s/.*${1}/${1}/p"`
! [ -z $lastfile ] && diff ${dxs_conf}/${1}-${timestamp} ${lastfile} >/dev/null
if [ $? -eq 0 ] ; then
echo "Configuration file ${2} didn't change - leaving unchanged"