Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <408021A3.2030501@unet.univie.ac.at> Date: Fri, 16 Apr 2004 20:10:43 +0200 From: Andreas-None User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 MIME-Version: 1.0 To: Cygwin List Subject: Re: chown, #!command in scripts, auto-execute (.bat), etc References: <4074382E DOT 90305 AT unet DOT univie DOT ac DOT at> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040409175111 DOT 03a38db0 AT 127 DOT 0 DOT 0 DOT 1> In-Reply-To: <6.0.1.1.0.20040409175111.03a38db0@127.0.0.1> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-ZID-Univie-Metrics: imap 4243; Body=0 Fuz1=0 Fuz2=0 Hallo! >>I unpacked all to a directory (Temp), where we have write-permissions. >> >> >What do you mean "unpacked"? Do you mean that you installed, using >setup.exe, in your "Temp" directory or did you do something else? > With "unpacking" I mean copying the files, otherwise I'd have written installed. So the registry is not set. >>So "my (imaginary) Root" is that directory, and I want to chroot to that directory, which doesn't work. -->(chroot instead of mounting /) >> Why doesn't that work (assuming not to have anything mounted!!), so / depends to which drive you cd. chroot D:/temp should be possible, but doesn't work. Why is /cygwin not named /mnt? - Why is it not possible to mount other things into /cygwin? >Do you mean '/cygdrive'? Name it whatever you like (see 'man mount'). >'/cygdrive' is a virtual file system used to map DOS drives into the POSIX space. > I know. But isn't it useful to name it /mnt, it maps the (target) mounts into that destination, as usual for /mnt. >>Or is /cygwin the (source-) "device" ? >> As I understood C:/tmp is the same as /cygdrive/C/tmp. Or is there any difference, except the handling of the file-permissions? >>>>chroot $InstallROOT; doesn't work # InstallROOT=/cygdrive/d/Temp/Cyg >>>>Also cd /; chroot . # doesn't work >>>>chroot /; # works, but worthless >>>> >>>>* mount works, whereas I can't alter anything (umount, mounting others doens't work) >>>>-->> umount: /cygdrive/H: Permission denied >>>>mkdir X; mount /dev/hda1 X -->> mount: X: Invalid argument >>>>which devices are to be used? (As /dev/null nothing exists, but works) >>>> >>>> >>>> >>I read it, but it doesnt work as expected: >>mkdir $HOME/L; mount -u D:/ $HOME/L >>-->mount: /cygdrive/d/temp/Cyg/home//L: Invalid argument >> >> >Afterwards it is shown in the mount-table, but the contents of the source-dir are not shown (meaning that it is not mounted.) - You'he tested that? > >>>>* Why doesn't work #!bash ? On other systems it's enough to let it find by the $PATH. >>>> >>>> >>>> >>>And what's in your path? Would you be able to find bash in it's installed >>>location using only your currently defined path as a guide? >>> >>> >>$InstallROOT/usr/bin is in my PATH. Typing bash (or any other command) (in the Home-dir) works! >>The problem is that under cygwin the path is not searched for any #!Commands (try out yourself!) >> >> > > >I did. Works fine. > > assuming: PATH=$PATH:/cygdrive/d/temp/bin2 cp /usr/bin/perl.exe /cygdrive/d/temp/bin2/perl2.exe cd $HOME contents of x: #!perl2print "works\n" # means chr(10) chmod u+x x ./x ## and that works for you?? >>>>Extension .bat is executed by command.com, if no extension, I would like to be able to leave the #!command out! >>>> >>>> >>>Sorry, I'm not sure what you're driving at with this statement, unless it >>>was just meant to clarify that you cannot run 'bash' without specifying >>>the full path to it. >>> Meaning: I want to leave out '#!bash', and that my scripts are interpreted by bash, not command.com (only .bat should be done with command.com) Is that possible? >>I'm speaking about the extension. Is it possible to execute any script (without known extension) using bash.exe, >>___WITHOUT___ having to write #!bash.exe in the first line?! (Because otherwise it is executed by command.com) >> >> >Sure. > > As I tested, scripts (e.g. x) can't be executed without the #!-line >>What does mount -x/-X/-E do in detail? (any files being interpreted as binary, regardless their permissions?) >>-o Option (-o managed) doesn't work? >> >Look at the Users Guide. > I ask you, because these details can't be found there! thanks, Andrew -- 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/