csih patch
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Feb 7 16:40:00 GMT 2011
Hi Chuck,
I'm trying to make the ssh-host-config script more foolproof. While
doing that I found a problem in cygwin-service-installation-helper.sh
which disallowed ssh-host-config to react differently if certain
problems showed up.
The csih_install_config returns a value which indicates if the
installation was successful. However, it also returns 1 if the user
said "no" to the question if an existing config file should be
overwritten. This is not correct, because it disallows the calling
script to check for a problem. The "no" answer is not a problem, but a
deliberate decision, so it should be treated as if everything's all
right.
Here's a patch to fix that:
--- cygwin-service-installation-helper.sh.ORIG 2011-02-07 17:27:14.749387200 +0100
+++ cygwin-service-installation-helper.sh 2011-02-07 17:27:43.344187200 +0100
@@ -1498,13 +1498,14 @@ csih_install_config()
if [ -f "$dest" ]
then
- if csih_request "Overwrite existing ${dest} file?"
+ if ! csih_request "Overwrite existing ${dest} file?"
then
- rm -f "${dest}"
- if [ -f "${dest}" ]
- then
- csih_warning "Can't overwrite. ${dest} is write protected."
- fi
+ return 0
+ fi
+ rm -f "${dest}"
+ if [ -f "${dest}" ]
+ then
+ csih_warning "Can't overwrite. ${dest} is write protected."
fi
fi
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list