are created correctly with CRLF line terminations. Patch from vinschen at
redhat.com.
+20031103
+ - (dtucker) [contrib/cygwin/ssh-host-config] Ensure entries in /etc/services
+ are created correctly with CRLF line terminations. Patch from vinschen at
+ redhat.com.
+
20031021
- (dtucker) [INSTALL] Some system crypt() functions support MD5 passwords
directly. Noted by Darren.Moffat at sun.com.
20031021
- (dtucker) [INSTALL] Some system crypt() functions support MD5 passwords
directly. Noted by Darren.Moffat at sun.com.
fi
# Care for services file
fi
# Care for services file
+_my_etcdir="/ssh-host-config.$$"
- _wservices="${SYSTEMROOT}\\system32\\drivers\\etc\\services"
- _wserv_tmp="${SYSTEMROOT}\\system32\\drivers\\etc\\srv.out.$$"
+ _win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc"
+ _services="${_my_etcdir}/services"
- _wservices="${WINDIR}\\SERVICES"
- _wserv_tmp="${WINDIR}\\SERV.$$"
+ _win_etcdir="${WINDIR}"
+ _services="${_my_etcdir}/SERVICES"
-_services=`cygpath -u "${_wservices}"`
-_serv_tmp=`cygpath -u "${_wserv_tmp}"`
+_serv_tmp="${_my_etcdir}/srv.out.$$"
-mount -t -f "${_wservices}" "${_services}"
-mount -t -f "${_wserv_tmp}" "${_serv_tmp}"
+mount -t -f "${_win_etcdir}" "${_my_etcdir}"
+
+# Depends on the above mount
+_wservices=`cygpath -w "${_services}"`
# Remove sshd 22/port from services
if [ `grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ]
# Remove sshd 22/port from services
if [ `grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ]
then
if mv "${_serv_tmp}" "${_services}"
then
then
if mv "${_serv_tmp}" "${_services}"
then
- echo "Removing sshd from ${_services}"
+ echo "Removing sshd from ${_wservices}"
- echo "Removing sshd from ${_services} failed\!"
+ echo "Removing sshd from ${_wservices} failed\!"
fi
rm -f "${_serv_tmp}"
else
fi
rm -f "${_serv_tmp}"
else
- echo "Removing sshd from ${_services} failed\!"
+ echo "Removing sshd from ${_wservices} failed\!"
then
if mv "${_serv_tmp}" "${_services}"
then
then
if mv "${_serv_tmp}" "${_services}"
then
- echo "Added ssh to ${_services}"
+ echo "Added ssh to ${_wservices}"
- echo "Adding ssh to ${_services} failed\!"
+ echo "Adding ssh to ${_wservices} failed\!"
fi
rm -f "${_serv_tmp}"
else
fi
rm -f "${_serv_tmp}"
else
- echo "Adding ssh to ${_services} failed\!"
+ echo "Adding ssh to ${_wservices} failed\!"
-umount "${_services}"
-umount "${_serv_tmp}"
# Care for inetd.conf file
_inetcnf="${SYSCONFDIR}/inetd.conf"
# Care for inetd.conf file
_inetcnf="${SYSCONFDIR}/inetd.conf"