X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: "H. S." Subject: Re: how to detect if Windows or Linux is running? Date: Thu, 01 Dec 2005 17:50:35 -0500 Lines: 40 Message-ID: References: <31DDB7BE4BF41D4888D41709C476B6570246A86E AT NIHCESMLBX5 DOT nih DOT gov> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) In-Reply-To: <31DDB7BE4BF41D4888D41709C476B6570246A86E@NIHCESMLBX5.nih.gov> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Buchbinder, Barry (NIH/NIAID) wrote: > H. S. wrote: > >>Christopher Faylor wrote: >> >>>On Thu, Dec 01, 2005 at 05:07:15PM -0500, H. S. wrote: >>> >>> >>>>Hi, >>>> >>>>I have installed Cygwin on a Windows XP computer to get rsync and >>>>ssh running so that I can backup my important data on a Linux >>>>computer on my home LAN. The idea is to use rsync to make rolling >>>>backups of my Windows data automatically, say, once or twice a day >>>>and to retain last N backups (N most probably going to be 10~20). >>>> >>>>But the problem I had not foreseen is that I dual boot this Windows >>>>machine between Windows XP and Debian. How should I gracefully let >>>>the rsync server know if this computer is running Linux or XP? >>>> >>>>I know that if the computer is running Linux, the rsync server will >>>>never find /cygdrive/... folders and will just quite with an error. >>>>But this is not 'clean', it will result in mails to the rsync >>>>server root about the error. >>>> >>>>Suggestions? > > > Perhaps you could look for environmental variables that Windows sets but > Linux doesn't. COMSPEC, windir, SystemDrive, SystemRoot, ProgramFiles, > CommonProgramFiles > er .. how can I do that using SSH and non-interactively? thanks, ->HS -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/