From john at jjdev.com Thu Jul 1 15:00:51 2004 From: john at jjdev.com (johnd) Date: Thu, 1 Jul 2004 15:00:51 -0700 Subject: [buug] mod_rewrite apache Message-ID: <20040701220051.GA6656@stang.jjdev.com> Anyone see a problem with this? I'm trying to have c2d/ prepending on all URLs ie: they type http://foo.com/ change to: http://foo.com/bar/ this is what I do in my apache conf file: RewriteEngine On RewriteLog rewrite.log RewriteLogLevel 3 RewriteRule /(.*) /c2d/$1 rewrite log: 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( 2) init rewrite engine with requested uri / 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( 3) applying pattern '/(.*)' to uri '/' 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( 2) rewrite / -> /c2d/ 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( 2) local path result: /c2d/ 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( 2) prefixed with document_root to /var/www/c2d/htdocs/c2d/ 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( 1) go-ahead with /var/www/c2d/htdocs/c2d/ [OK] 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 ) init rewrite engine with requested uri /C2DControllerServlet 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (3 ) applying pattern '/(.*)' to uri '/C2DControllerServlet' 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 ) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 ) local path result: /c2d/C2DControllerServlet 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 ) prefixed with document_root to /var/www/c2d/htdocs/c2d/C2DControllerServlet 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (1 ) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet [OK] 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re dir#1] (2) init rewrite engine with requested uri /C2DControllerServlet 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re dir#1] (3) applying pattern '/(.*)' to uri '/C2DControllerServlet' 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re dir#1] (2) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re dir#1] (2) local path result: /c2d/C2DControllerServlet 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re dir#1] (2) prefixed with document_root to /var/www/c2d/htdocs/c2d/C2DControllerServlet 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re dir#1] (1) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet [OK] From flarg at flarg.org Thu Jul 1 22:30:53 2004 From: flarg at flarg.org (Stefan Lasiewski) Date: Thu, 1 Jul 2004 22:30:53 -0700 (PDT) Subject: [buug] mod_rewrite apache In-Reply-To: <20040701220051.GA6656@stang.jjdev.com> Message-ID: <20040702053053.57825.qmail@web80603.mail.yahoo.com> It's been a while, but... It looks like multiple rules are being applied to one request, which is why you may want to use the [L] (Stop processing) flag. I think you might want to use the 'Redirect, stop processing' flags, like this: RewriteRule /(.*) /c2d/$1 [R,L] Also, if you use /(.*) as a pattern, I think the rule will apply to 'foo.com/bar' but not 'foo.com/' because the pattern is looking for '/', followed by 1 or more characters (.*). Maybe you want this instead? RewriteRule ^(.*) /c2d/$1 [R,L] Also, it's not clear from the log below: What URLs did you try, and did any of them work? -= Stefan --- johnd wrote: > Anyone see a problem with this? > > > I'm trying to have c2d/ prepending on all URLs > > > ie: they type http://foo.com/ change to: http://foo.com/bar/ > > > this is what I do in my apache conf file: > > RewriteEngine On > RewriteLog rewrite.log > RewriteLogLevel 3 > RewriteRule /(.*) /c2d/$1 > > > rewrite log: > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > 2) init rewrite engine with requested uri / > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > 3) applying pattern '/(.*)' to uri '/' > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > 2) rewrite / -> /c2d/ > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > 2) local path result: /c2d/ > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > 2) prefixed with document_root to /var/www/c2d/htdocs/c2d/ > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > 1) go-ahead with /var/www/c2d/htdocs/c2d/ [OK] > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > ) init rewrite engine with requested uri /C2DControllerServlet > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (3 > ) applying pattern '/(.*)' to uri '/C2DControllerServlet' > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > ) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > ) local path result: /c2d/C2DControllerServlet > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > ) prefixed with document_root to > /var/www/c2d/htdocs/c2d/C2DControllerServlet > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (1 > ) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet [OK] > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > dir#1] (2) init rewrite engine with requested uri /C2DControllerServlet > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > dir#1] (3) applying pattern '/(.*)' to uri '/C2DControllerServlet' > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > dir#1] (2) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > dir#1] (2) local path result: /c2d/C2DControllerServlet > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > dir#1] (2) prefixed with document_root to > /var/www/c2d/htdocs/c2d/C2DControllerServlet > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > dir#1] (1) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet [OK] > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug > ===== ---- 'The art, or rather the knack of flying is learning to throw yourself to the ground and miss.' -Douglas Adams, THGTTG From mp at rawbw.com Fri Jul 2 05:17:26 2004 From: mp at rawbw.com (Michael Paoli) Date: Fri, 2 Jul 2004 05:17:26 -0700 Subject: [buug] LinuxWorld registration deadline TODAY! (for free Expo pass/best conference pricing) Message-ID: <1088770646.40e5525691c7f@webmail.rawbw.com> A reminder, or for those who weren't aware, today is registration deadline for free Expo Pass registration (and apparently also best pricing on conference options) for: LinuxWorld Conference & Expo August 2-5, 2004 The Moscone Center San Francisco, CA http://www.linuxworldexpo.com/live/12/events/12SFO04A One may need to use one of these PRIORITY CODEs: B0201 B0401 B0601 B0801 B1001 for best pricing and/or complimentary Expo registration (I'd guestimate all of those codes are probably equivalent, or nearly so). From jzitt at josephzitt.com Fri Jul 2 19:31:09 2004 From: jzitt at josephzitt.com (Joseph Zitt) Date: Fri, 02 Jul 2004 19:31:09 -0700 Subject: [buug] Quick Emacs Macro? Message-ID: <1088821869.3480.42.camel@localhost> Hi, all. I've been hitting my head against putting this together, but knowing that some of the folks here practically dream in Emacs: I'm looking for a simple Emacs macro that would take a string such as Foo bar baz and turn it into Foo bar baz either prompting for the string to be processed or by selecting it as a region and then using the macro. Any quick inspirations? From itz at buug.org Fri Jul 2 22:42:31 2004 From: itz at buug.org (Ian Zimmerman) Date: 02 Jul 2004 22:42:31 -0700 Subject: [buug] Quick Emacs Macro? In-Reply-To: <1088821869.3480.42.camel@localhost> References: <1088821869.3480.42.camel@localhost> Message-ID: <87isd5ir3s.fsf@buug.org> Joseph> Foo bar baz and turn it into Joseph> Foo bar baz Joseph> either prompting for the string to be processed or by selecting Joseph> it as a region and then using the macro. Does "either" mean "I decide" or "the program decides"? Emacs _macros_ (unlike Emacs _functions_) don't really allow branching. -- "It's not true or not." A reality show producer (real quote) From grayarea at reddagger.org Sat Jul 3 16:48:20 2004 From: grayarea at reddagger.org (jwithers) Date: Sat, 03 Jul 2004 16:48:20 -0700 Subject: [buug] NIS, X libs and Permissions Message-ID: <1088898500.12339.15.camel@localhost> Hoping someone can help me with a most odd and perplexing problem. I set up a couple of RH9 workstations for a client, these workstations are going to handle graphics stuff and use NVIDIA graphics cards. Account auth is handled by NIS. Now, when I use an account local to the workstations, everything works fine. But when I use an account that is coming from NIS, everything works fine, _except_ the 3d drivers for the nvidia cards won't load. The actual error is: Xlib: extension "GLX" missing on display ":0.0" Now, if this were happening in general, I would know the cause. It would be a bad XF86Config or driver install causing the nvidia custom glx 3d extension not to load. But, again, it works like a champ when the accounts are coming from the local /etc/passwd file. And before those aware of nvidia installs start on it, the XF86Config's are setup correctly, with dri out, glx in, and nvidia drivers instead of nv. There are other RH9 boxes using the same setup at this shop setup by someone previous to me, and they work fine. I have checked the permissions for what appear to be the relevant libs and they are the same on the pre-existing boxes as on my two new ones. Also checked the XF86Config's and they are the same as well. The kernels are stock RH9 off the install disks. The NVIDIA drivers are not using precompiled driver versions, but are custom compiling against the running kernel. The fact they are working locally pretty much rules out a driver/kernel mismatch issue in my mind. If this weren't working period, then I would get it. But the working for locally authed users and not for NIS authed users is stumping me. The NIS authed users appear to be working perfectly, except for this one thing. I have a very, very uneducated hunch that PAM might be playing into this somewhere, but don't really know enough about PAM, NIS and X interactions to really have a clue, it is just a kneejerk guess. If some NIS guru out there can point me in the right direction on this, it would be very much appreciated. Thanks, John P. Withers From jzitt at josephzitt.com Sat Jul 3 21:21:09 2004 From: jzitt at josephzitt.com (Joseph Zitt) Date: Sat, 03 Jul 2004 21:21:09 -0700 Subject: [buug] Quick Emacs Macro? In-Reply-To: <87isd5ir3s.fsf@buug.org> References: <1088821869.3480.42.camel@localhost> <87isd5ir3s.fsf@buug.org> Message-ID: <1088914865.3480.80.camel@localhost> On Fri, 2004-07-02 at 22:42, Ian Zimmerman wrote: > Joseph> Foo bar baz and turn it into > > Joseph> Foo bar baz > > Joseph> either prompting for the string to be processed or by selecting > Joseph> it as a region and then using the macro. > > Does "either" mean "I decide" or "the program decides"? > > Emacs _macros_ (unlike Emacs _functions_) don't really allow branching. Whoops. "either" means that I'd be happy with a macro that worked either way. From itz at buug.org Sat Jul 3 21:41:29 2004 From: itz at buug.org (Ian Zimmerman) Date: 03 Jul 2004 21:41:29 -0700 Subject: [buug] Quick Emacs Macro? In-Reply-To: <1088914865.3480.80.camel@localhost> References: <1088821869.3480.42.camel@localhost> <87isd5ir3s.fsf@buug.org> <1088914865.3480.80.camel@localhost> Message-ID: <87pt7cidty.fsf@buug.org> Joseph> On Fri, 2004-07-02 at 22:42, Ian Zimmerman wrote: Foo bar baz Joseph> and turn it into Joseph> Foo bar baz Joseph> either prompting for the string to be processed or by selecting Joseph> it as a region and then using the macro. (fset 'xmlize-region [?\M-x ?e ?n ?a ?b ?l ?e ?- ?c ?o ?m ?m ?a ?n ?d return ?n ?a ?r ?r ?o ?w ?- ?t ?o ?- ?r ?e ?g ?i ?o ?n return ?\C-x ?\C-x ?\C-x ?\C-x ?\M-w ?\C-x ?\C-x ?< ?/ ?b ?> ?< ?/ ?a ?> ?\C-x ?\C-x ?< ?b ?> left left left ?< ?> left ?a ? ?n ?a ?m ?e ?= ?" ?" left ?\C-y ?\C-x ?\C-x ?\M-x ?n ?a ?r ?r ?o ?w ?- ?t ?o ?- ?r ?e ?g ?i ?o ?n return ?\M-% ?r ?e ?p ?l ?a ?c ?e ?- ?s ?t ?r ?i ?n ?g return ? return ?\M-x ?r ?e ?p ?l ?a ?c ?e ?- ?s ?t ?r ?i ?n ?g return ? return ?_ return ?\M-x ?w ?i ?d ?e ?n return]) This inserts the literal tags and , which is likely not what you really wanted :-) -- "It's not true or not." A reality show producer (real quote) From shiro at uclink4.berkeley.edu Sun Jul 4 13:12:38 2004 From: shiro at uclink4.berkeley.edu (Erik Shirokoff) Date: Sun, 4 Jul 2004 13:12:38 -0700 Subject: [buug] Quick Emacs Macro? In-Reply-To: <1088821869.3480.42.camel@localhost> References: <1088821869.3480.42.camel@localhost> Message-ID: <20040704201238.GA30869@jabberwock.hopto.org> Hi Joseph, Started this before I saw the other response. Oh well - now you have two options. Here's a small function that will do what you want. Everything I know about emacs lisp has been found through trial and error, so there is almost certainly a more elegant way to doing it. None the less, it works, at least in GNU Emacs 21.3.2. Also, in case it's useful, the most useful references I know about for emacs tinkering are (perhaps obviously): the offical GNU intro and manual: http://www.gnu.org/software/emacs/emacs-lisp-intro/ http://www.gnu.org/software/emacs/elisp-manual/ a chart of lisp expressions for people who know perl: http://www.grin.net/~mirthles/devnotes/elisp-for-perl-programmers.html take care, Erik -------------- next part -------------- ;Add this definition to .emacs, or stick it in a .el file and then invoke it with load-file or autoload. If you want to get fancy, you could play with hooks and modes to avoid loading it when you're not editing html. ;prompt for input and add an html name tag ;with spaces converted to underscores (defun add-name-tag (tagin) "make an html name tag from user input" (interactive "Mtag text> ") (let ((tagout (replace-regexp-in-string " " "_" tagin))) (insert (concat "" tagin "") ) ) ) ;add something like this to add a key binding. Here's it's ctrl+c, n. (I haven't checked for conflicts!) (global-set-key "\C-cn" 'add-name-tag) From jzitt at josephzitt.com Mon Jul 5 00:49:15 2004 From: jzitt at josephzitt.com (Joseph Zitt) Date: Mon, 05 Jul 2004 00:49:15 -0700 Subject: [buug] Quick Emacs Macro? In-Reply-To: <20040704201238.GA30869@jabberwock.hopto.org> References: <1088821869.3480.42.camel@localhost> <20040704201238.GA30869@jabberwock.hopto.org> Message-ID: <1089013755.19735.70.camel@localhost> Thanks! I should have probably been looking for a function in the first place. I've done some Lisp, so while I couldn't quite wrap my head around how to do it in the first place, I was able to drop this into my .emacs and tweak it further from there to do even more of what I wanted. Thanks also to Ian for the macro-based solution. I'm going to have to stare at that a while and play with it to get a handle on how macro definition works in practice. On Sun, 2004-07-04 at 13:12, Erik Shirokoff wrote: > Hi Joseph, > > Started this before I saw the other response. Oh well - now you have two options. > > Here's a small function that will do what you want. Everything I know about emacs lisp has been found through trial and error, so there is almost certainly a more elegant way to doing it. None the less, it works, at least in GNU Emacs 21.3.2. > > Also, in case it's useful, the most useful references I know about for emacs tinkering are (perhaps obviously): > > the offical GNU intro and manual: > http://www.gnu.org/software/emacs/emacs-lisp-intro/ > http://www.gnu.org/software/emacs/elisp-manual/ > > a chart of lisp expressions for people who know perl: > http://www.grin.net/~mirthles/devnotes/elisp-for-perl-programmers.html From jammer at weak.org Tue Jul 6 09:46:52 2004 From: jammer at weak.org (Jon McClintock) Date: Tue, 6 Jul 2004 09:46:52 -0700 Subject: [buug] Free Linux Technical Resource Kit from Novell Message-ID: <20040706164652.GN14747@weak.org> Hey guys, Novell's giving away a "Linux Technical Resource Kit", containing: - SUSE LINUX Standard Server 8.0 (ISO Installation Images) - SUSE LINUX 9.1 Professional (Bootable Installation DVD) - Ximian Desktop 2.0 Evaluation (ISO Image) - Ximian Red Carpet 2.0.2 Evaluation (ISO Image) - Novell Linux Services 1.0 (ISO Image & NLS Companion CD) - Novell GroupWise for Linux 6.5.1 - Server, Client & Messenger (ISO Images) - and more... Get yours at: http://www.novell.com/community/linux/order.php?sourceid=uscin -Jon From john at jjdev.com Tue Jul 6 10:10:38 2004 From: john at jjdev.com (johnd) Date: Tue, 6 Jul 2004 10:10:38 -0700 Subject: [buug] mod_rewrite apache In-Reply-To: <20040702053053.57825.qmail@web80603.mail.yahoo.com> References: <20040701220051.GA6656@stang.jjdev.com> <20040702053053.57825.qmail@web80603.mail.yahoo.com> Message-ID: <20040706171038.GA22530@stang.jjdev.com> this causes an endless loop, because you are using R and redirecting back to the server...and it keeps doing that in a loop On Thu, Jul 01, 2004 at 10:30:53PM -0700, Stefan Lasiewski wrote: > It's been a while, but... > > It looks like multiple rules are being applied to one request, which is why > you may want to use the [L] (Stop processing) flag. I think you might want to > use the 'Redirect, stop processing' flags, like this: > > RewriteRule /(.*) /c2d/$1 [R,L] > > Also, if you use /(.*) as a pattern, I think the rule will apply to > 'foo.com/bar' but not 'foo.com/' because the pattern is looking for '/', > followed by 1 or more characters (.*). Maybe you want this instead? > > RewriteRule ^(.*) /c2d/$1 [R,L] > > Also, it's not clear from the log below: What URLs did you try, and did any > of them work? > > -= Stefan > > --- johnd wrote: > > Anyone see a problem with this? > > > > > > I'm trying to have c2d/ prepending on all URLs > > > > > > ie: they type http://foo.com/ change to: http://foo.com/bar/ > > > > > > this is what I do in my apache conf file: > > > > RewriteEngine On > > RewriteLog rewrite.log > > RewriteLogLevel 3 > > RewriteRule /(.*) /c2d/$1 > > > > > > rewrite log: > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > 2) init rewrite engine with requested uri / > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > 3) applying pattern '/(.*)' to uri '/' > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > 2) rewrite / -> /c2d/ > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > 2) local path result: /c2d/ > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > 2) prefixed with document_root to /var/www/c2d/htdocs/c2d/ > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > 1) go-ahead with /var/www/c2d/htdocs/c2d/ [OK] > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > ) init rewrite engine with requested uri /C2DControllerServlet > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (3 > > ) applying pattern '/(.*)' to uri '/C2DControllerServlet' > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > ) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > ) local path result: /c2d/C2DControllerServlet > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > ) prefixed with document_root to > > /var/www/c2d/htdocs/c2d/C2DControllerServlet > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (1 > > ) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet [OK] > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > dir#1] (2) init rewrite engine with requested uri /C2DControllerServlet > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > dir#1] (3) applying pattern '/(.*)' to uri '/C2DControllerServlet' > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > dir#1] (2) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > dir#1] (2) local path result: /c2d/C2DControllerServlet > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > dir#1] (2) prefixed with document_root to > > /var/www/c2d/htdocs/c2d/C2DControllerServlet > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > dir#1] (1) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet [OK] > > _______________________________________________ > > Buug mailing list > > Buug at weak.org > > http://www.weak.org/mailman/listinfo/buug > > > > > ===== > ---- > 'The art, or rather the knack > of flying is learning to throw > yourself to the ground and miss.' > -Douglas Adams, THGTTG > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug From unixjavabob at yahoo.com Tue Jul 6 10:35:26 2004 From: unixjavabob at yahoo.com (Bob Read) Date: Tue, 6 Jul 2004 10:35:26 -0700 (PDT) Subject: [buug] Quick Emacs Macro? In-Reply-To: <87pt7cidty.fsf@buug.org> Message-ID: <20040706173526.25648.qmail@web54107.mail.yahoo.com> ?w ?h ? o ?i ?n ?v ?e ?n ?t ?e ?d ?t ?h ?i ?s ?c ?r ?a ?p ?p ?y ?s ?y ?n ? ?a ?x ?? --- Ian Zimmerman wrote: > > Joseph> On Fri, 2004-07-02 at 22:42, Ian Zimmerman > wrote: Foo bar baz > Joseph> and turn it into > > Joseph> Foo bar baz > > Joseph> either prompting for the string to be > processed or by selecting > Joseph> it as a region and then using the macro. > > (fset 'xmlize-region > [?\M-x ?e ?n ?a ?b ?l ?e ?- ?c ?o ?m ?m ?a ?n ?d > return > ?n ?a ?r ?r ?o ?w ?- ?t ?o ?- ?r ?e ?g ?i ?o ?n > return > ?\C-x ?\C-x ?\C-x ?\C-x ?\M-w ?\C-x ?\C-x ?< ?/ > ?b ?> > ?< ?/ ?a ?> ?\C-x ?\C-x ?< ?b ?> left left left > ?< ?> > left ?a ? ?n ?a ?m ?e ?= ?" ?" left ?\C-y ?\C-x > ?\C-x > ?\M-x ?n ?a ?r ?r ?o ?w ?- ?t ?o ?- ?r ?e ?g ?i > ?o ?n return > ?\M-% ?r ?e ?p ?l ?a ?c ?e ?- ?s ?t ?r ?i ?n ?g > return ? > return ?\M-x ?r ?e ?p ?l ?a ?c ?e ?- ?s ?t ?r ?i > ?n ?g return ? > return ?_ return ?\M-x ?w ?i ?d ?e ?n return]) > > This inserts the literal tags and , which is > likely not what you > really wanted :-) > > -- > "It's not true or not." A reality show producer > (real quote) > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug > ===== ----------------------------------------- Bob Read Exit Code Incorporated cell (510)-703-1634 unixjavabob at yahoo.com ----------------------------------------- __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail From flarg at flarg.org Wed Jul 7 10:51:55 2004 From: flarg at flarg.org (Stefan Lasiewski) Date: Wed, 7 Jul 2004 10:51:55 -0700 (PDT) Subject: [buug] mod_rewrite apache In-Reply-To: <20040706171038.GA22530@stang.jjdev.com> Message-ID: <20040707175155.43683.qmail@web80605.mail.yahoo.com> Hm, I thought the [L] would prevent loops... -= Stefan --- johnd wrote: > this causes an endless loop, because you are using R and redirecting > back to the server...and it keeps doing that in a loop > > On Thu, Jul 01, 2004 at 10:30:53PM -0700, Stefan Lasiewski wrote: > > It's been a while, but... > > > > It looks like multiple rules are being applied to one request, which is > why > > you may want to use the [L] (Stop processing) flag. I think you might > want to > > use the 'Redirect, stop processing' flags, like this: > > > > RewriteRule /(.*) /c2d/$1 [R,L] > > > > Also, if you use /(.*) as a pattern, I think the rule will apply to > > 'foo.com/bar' but not 'foo.com/' because the pattern is looking for '/', > > followed by 1 or more characters (.*). Maybe you want this instead? > > > > RewriteRule ^(.*) /c2d/$1 [R,L] > > > > Also, it's not clear from the log below: What URLs did you try, and did > any > > of them work? > > > > -= Stefan > > > > --- johnd wrote: > > > Anyone see a problem with this? > > > > > > > > > I'm trying to have c2d/ prepending on all URLs > > > > > > > > > ie: they type http://foo.com/ change to: http://foo.com/bar/ > > > > > > > > > this is what I do in my apache conf file: > > > > > > RewriteEngine On > > > RewriteLog rewrite.log > > > RewriteLogLevel 3 > > > RewriteRule /(.*) /c2d/$1 > > > > > > > > > rewrite log: > > > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > 2) init rewrite engine with requested uri / > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > 3) applying pattern '/(.*)' to uri '/' > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > 2) rewrite / -> /c2d/ > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > 2) local path result: /c2d/ > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > 2) prefixed with document_root to /var/www/c2d/htdocs/c2d/ > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > 1) go-ahead with /var/www/c2d/htdocs/c2d/ [OK] > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > > ) init rewrite engine with requested uri /C2DControllerServlet > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (3 > > > ) applying pattern '/(.*)' to uri '/C2DControllerServlet' > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > > ) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > > ) local path result: /c2d/C2DControllerServlet > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > > ) prefixed with document_root to > > > /var/www/c2d/htdocs/c2d/C2DControllerServlet > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (1 > > > ) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet [OK] > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > dir#1] (2) init rewrite engine with requested uri /C2DControllerServlet > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > dir#1] (3) applying pattern '/(.*)' to uri '/C2DControllerServlet' > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > dir#1] (2) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > dir#1] (2) local path result: /c2d/C2DControllerServlet > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > dir#1] (2) prefixed with document_root to > > > /var/www/c2d/htdocs/c2d/C2DControllerServlet > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > dir#1] (1) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet > [OK] > > > _______________________________________________ > > > Buug mailing list > > > Buug at weak.org > > > http://www.weak.org/mailman/listinfo/buug > > > > > > > > > ===== > > ---- > > 'The art, or rather the knack > > of flying is learning to throw > > yourself to the ground and miss.' > > -Douglas Adams, THGTTG > > _______________________________________________ > > Buug mailing list > > Buug at weak.org > > http://www.weak.org/mailman/listinfo/buug > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug > ===== ---- 'The art, or rather the knack of flying is learning to throw yourself to the ground and miss.' -Douglas Adams, THGTTG From john at jjdev.com Wed Jul 7 11:08:28 2004 From: john at jjdev.com (johnd) Date: Wed, 7 Jul 2004 11:08:28 -0700 Subject: [buug] mod_rewrite apache In-Reply-To: <20040707175155.43683.qmail@web80605.mail.yahoo.com> References: <20040706171038.GA22530@stang.jjdev.com> <20040707175155.43683.qmail@web80605.mail.yahoo.com> Message-ID: <20040707180828.GC27873@stang.jjdev.com> I don't think it would...it just means last... put when it proxies back to itself that is a new one so it does it again On Wed, Jul 07, 2004 at 10:51:55AM -0700, Stefan Lasiewski wrote: > Hm, I thought the [L] would prevent loops... > > -= Stefan > > --- johnd wrote: > > this causes an endless loop, because you are using R and redirecting > > back to the server...and it keeps doing that in a loop > > > > On Thu, Jul 01, 2004 at 10:30:53PM -0700, Stefan Lasiewski wrote: > > > It's been a while, but... > > > > > > It looks like multiple rules are being applied to one request, which is > > why > > > you may want to use the [L] (Stop processing) flag. I think you might > > want to > > > use the 'Redirect, stop processing' flags, like this: > > > > > > RewriteRule /(.*) /c2d/$1 [R,L] > > > > > > Also, if you use /(.*) as a pattern, I think the rule will apply to > > > 'foo.com/bar' but not 'foo.com/' because the pattern is looking for '/', > > > followed by 1 or more characters (.*). Maybe you want this instead? > > > > > > RewriteRule ^(.*) /c2d/$1 [R,L] > > > > > > Also, it's not clear from the log below: What URLs did you try, and did > > any > > > of them work? > > > > > > -= Stefan > > > > > > --- johnd wrote: > > > > Anyone see a problem with this? > > > > > > > > > > > > I'm trying to have c2d/ prepending on all URLs > > > > > > > > > > > > ie: they type http://foo.com/ change to: http://foo.com/bar/ > > > > > > > > > > > > this is what I do in my apache conf file: > > > > > > > > RewriteEngine On > > > > RewriteLog rewrite.log > > > > RewriteLogLevel 3 > > > > RewriteRule /(.*) /c2d/$1 > > > > > > > > > > > > rewrite log: > > > > > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > > 2) init rewrite engine with requested uri / > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > > 3) applying pattern '/(.*)' to uri '/' > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > > 2) rewrite / -> /c2d/ > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > > 2) local path result: /c2d/ > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > > 2) prefixed with document_root to /var/www/c2d/htdocs/c2d/ > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#813a3c8/initial] ( > > > > 1) go-ahead with /var/www/c2d/htdocs/c2d/ [OK] > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > > > ) init rewrite engine with requested uri /C2DControllerServlet > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (3 > > > > ) applying pattern '/(.*)' to uri '/C2DControllerServlet' > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > > > ) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > > > ) local path result: /c2d/C2DControllerServlet > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (2 > > > > ) prefixed with document_root to > > > > /var/www/c2d/htdocs/c2d/C2DControllerServlet > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec50/subreq] (1 > > > > ) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet [OK] > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > > dir#1] (2) init rewrite engine with requested uri /C2DControllerServlet > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > > dir#1] (3) applying pattern '/(.*)' to uri '/C2DControllerServlet' > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > > dir#1] (2) rewrite /C2DControllerServlet -> /c2d/C2DControllerServlet > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > > dir#1] (2) local path result: /c2d/C2DControllerServlet > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > > dir#1] (2) prefixed with document_root to > > > > /var/www/c2d/htdocs/c2d/C2DControllerServlet > > > > 192.168.164.34 - - [01/Jul/2004:14:51:14 -0700] > > > > [privatestaging.connect2data.com/sid#80beaf8][rid#80cec28/initial/re > > > > dir#1] (1) go-ahead with /var/www/c2d/htdocs/c2d/C2DControllerServlet > > [OK] > > > > _______________________________________________ > > > > Buug mailing list > > > > Buug at weak.org > > > > http://www.weak.org/mailman/listinfo/buug > > > > > > > > > > > > > ===== > > > ---- > > > 'The art, or rather the knack > > > of flying is learning to throw > > > yourself to the ground and miss.' > > > -Douglas Adams, THGTTG > > > _______________________________________________ > > > Buug mailing list > > > Buug at weak.org > > > http://www.weak.org/mailman/listinfo/buug > > _______________________________________________ > > Buug mailing list > > Buug at weak.org > > http://www.weak.org/mailman/listinfo/buug > > > > > ===== > ---- > 'The art, or rather the knack > of flying is learning to throw > yourself to the ground and miss.' > -Douglas Adams, THGTTG > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug From mp at rawbw.com Thu Jul 8 07:08:27 2004 From: mp at rawbw.com (Michael Paoli) Date: Thu, 8 Jul 2004 07:08:27 -0700 Subject: [buug] LinuxWorld free Expo pass/best conference pricing deadline extended through 2004-07-09 with PRIORITY CODE B1601 In-Reply-To: <1088770646.40e5525691c7f@webmail.rawbw.com> References: <1088770646.40e5525691c7f@webmail.rawbw.com> Message-ID: <1089295707.40ed555b9234a@webmail.rawbw.com> The LinuxWorld Conference & Expo deadline for free expo pass and best ("early bird") pricing has been extended through 2004-07-09. Use PRIORITY CODE: B1601 (the deadline for the best prices will still show up as 2004-07-02, but those best prices will show up under "Your Price" when PRIORITY CODE: B1601 is used). references/excerpts: Quoting Michael Paoli: > A reminder, or for those who weren't aware, registration > deadline for free Expo Pass registration (and apparently also best > pricing on conference options) for: > LinuxWorld Conference & Expo > August 2-5, 2004 > The Moscone Center > San Francisco, CA > http://www.linuxworldexpo.com/live/12/events/12SFO04A > PRIORITY CODE: B1601 > for best pricing and/or complimentary Expo registration From crazylion at vip.sina.com Sun Jul 11 03:59:53 2004 From: crazylion at vip.sina.com (George Wong) Date: Sun, 11 Jul 2004 18:59:53 +0800 Subject: [buug] ignore it!have a try:) Message-ID: <200407111101.i6BB1D1i005534@weak.org> sorry^O^ From wfhoney at pacbell.net Fri Jul 16 12:28:44 2004 From: wfhoney at pacbell.net (Bill Honeycutt) Date: Fri, 16 Jul 2004 12:28:44 -0700 Subject: [buug] Commercial firewalls Message-ID: <40F82C6C.5000904@pacbell.net> Hi, I'm doing some commercial firewall fact finding for my company. This is a medium sized company (200 users with a similar number of remote hosts) and our preliminary nattering has focused on three contenders: Checkpoint FW-1 Cisco Pix 515e (w/ restrict, also unrestricted) SonicWall pro 4060 I'm hoping some of you who have deployed these or similar commercial solutions might comment, damn, praise, wax philosophic, etc., about your experience with them. We do a lot of packet filtering and port blocking. We have a VPN set up for some remote users, ICA thin client services and a smattering of apache extranet pages. I seem to remember this being discussed a while back, but the archives aren't searchable : ( Thanks! Bill From mp at rawbw.com Sat Jul 17 14:27:47 2004 From: mp at rawbw.com (Michael Paoli) Date: Sat, 17 Jul 2004 14:27:47 -0700 Subject: [buug] searchable archives (e.g. Commercial firewalls) Message-ID: <1090099667.40f999d3a8b8b@webmail.rawbw.com> "the archives aren't searchable"???! Looks pretty searchable to me. E.g.: http://www.google.com/search?hl=en&ie=UTF-8&q=site%3Awww.weak.org+firewalls+buug&btnG=Google+Search references: http://www.weak.org/pipermail/buug/2004-July/002471.html http://www.google.com/advanced_search?hl=en From john at jjdev.com Sat Jul 17 23:42:42 2004 From: john at jjdev.com (John de la Garza) Date: Sat, 17 Jul 2004 23:42:42 -0700 Subject: [buug] kaza Message-ID: anyone know of a kaza clinet for any UNIX? From mp at rawbw.com Sun Jul 18 15:01:19 2004 From: mp at rawbw.com (Michael Paoli) Date: Sun, 18 Jul 2004 15:01:19 -0700 Subject: [buug] Debian 3.0r2 i386 Binary-1 & Knoppix CDs, etc. In-Reply-To: <40F9A5C5.7030709@alamedanet.net> References: <40F89492.4090409@alamedanet.net> <20040717161917.GQ19398@linuxmafia.com> <20040717171241.GB2246@primate.net> <40F9A5C5.7030709@alamedanet.net> Message-ID: <1090188079.40faf32f5e599@webmail.rawbw.com> FYI, more often than not, when I attend UNIX/LINUX/Debian user group meetings, I typically bring a small supply of Debian and Knoppix CDs. (CD-RW media with jewel or slim-jewel case, $2.00 USD, see URL shortly below for more information). When in doubt, e-mail me ahead of time - or ask at the meeting. Anyway, similar to before ...: http://www.weak.org/pipermail/buug/2003-December/002263.html ... except now up to KNOPPIX_V3.4-2004-05-17-EN ... and I guess the next release (3.0r3) of Debian stable is due out in the not-too-horribly-distant future ... but I don't have that yet. ... and regarding that balug-talk at balug.org post ( http://www.balug.org/pipermail/balug-talk/2004-July/002792.html )and such: Quoting jonathan jefferies : > any commentary on this side issue. I have tried > to download Knoppix in addition to LNX-BBC (which is a > nice emergency patcher). But trying all of the US sites - > several of which were off line - and one brit site I > couldn't get an entire iso image. I'll try again later. > And bittorrent wasn't particularly helpful either. Uhm, ... I hope at least if you're not using bittorrent, that when you get a partial download, you're not starting again from scratch each time, (e.g. one is using the reget command in ftp, or the -c option to wget, or similar means to continue the download, rather than starting from scratch). From john at jjdev.com Mon Jul 19 11:17:46 2004 From: john at jjdev.com (johnd) Date: Mon, 19 Jul 2004 11:17:46 -0700 Subject: [buug] loadbalancing Message-ID: <20040719181746.GB24740@stang.jjdev.com> At my company we have a device we call a web-switch. It basically load balances and knows to stop sending traffic to servers when they go down. We currently looking to get a new device like this. Somebody here is recommending a product called BigIP by F5. Or one of Ciscos CSS devices. I'm just curious as to the feasibility (in your guys' opinions) of setting up a Linux box (or cluster) to do this kind of stuff. Would you just go with a dedicated device or set your own up with a Linux box? I've always been one to throw Linux solutions around as if it was some kind of silver bullet, but I don't want to get stuck in that mind set. -- Microsoft is not the answer. Microsoft is the question. NO (or Linux) is the answer. http://www.livingwithoutmicrosoft.org/ http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml From atporter at primate.net Mon Jul 19 11:15:31 2004 From: atporter at primate.net (Aaron T Porter) Date: Mon, 19 Jul 2004 11:15:31 -0700 Subject: [buug] loadbalancing In-Reply-To: <20040719181746.GB24740@stang.jjdev.com> References: <20040719181746.GB24740@stang.jjdev.com> Message-ID: <20040719181531.GC2246@primate.net> On Mon, Jul 19, 2004 at 11:17:46AM -0700, johnd wrote: > I'm just curious as to the feasibility (in your guys' opinions) of setting > up a Linux box (or cluster) to do this kind of stuff. > > Would you just go with a dedicated device or set your own up with a Linux > box? I've run BigIP, Radware and Cisco load balancers as well as using Linux Virtual Server. Unless you *really* need a gui config tool, I'd strongly suggest Linux Virtual Server. It just plain works. For a very small fraction of the cost of a single commercial box you can get a failover linux cluster working. Using clustered celeron 400's and the Direct Routing mode for LVS we pushed in excess of 50mb/s in web traffic. The load on the LVS system never broke 0.01. From crazylion at vip.sina.com Tue Jul 20 07:23:00 2004 From: crazylion at vip.sina.com (George Wong) Date: Tue, 20 Jul 2004 22:23:00 +0800 Subject: [buug] A socket program Message-ID: <200407201425.i6KEPSMs011637@weak.org> I write a socket program which function is to transmit a file on linux. I but it is always abnormal. There is no transfers occour. I cannot find out reason. Could anybody give me some advices? The attachment is the exacutable file. Problem: 1.Every time,after a client unconnected to the server,server will stop, but it should loop forever untill I poweroff. 2.It could only create a 0 byte file which name is as same as I want, There is acctually no transfers occours. Usage: ./server -h && ./client -h show help ----server.c------ /* * server.c * * Multiclient supported * * Create: 15:43 2004-07-19 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef SHUT_RDWR #define SHUT_RDWR 3 #endif #define MAX_CLIENTS 64 #define BUF_SIZE 4096 #define BACKLOG 10 /* How many pending connections queue will hold */ #define CORRECT 1 #define WRONG 0 /* * Client List */ typedef struct{ FILE *rece; FILE *write; } ClientInfo; ClientInfo client_list[MAX_CLIENTS]; /* * Used to report error * and return to shell */ static void bail(const char *on_what) { if(errno!=0) { fputs(strerror(errno),stderr); fputs(":",stderr); } fputs(on_what,stderr); fputc('\n',stderr); exit(1); } void help() { printf("File server 0.1:\n"); printf("Usage: server [host address [port]]\n"); printf("Examples:\n"); printf("\t server\n"); printf("\t server 127.0.0.1\n"); printf("\t server 127.0.0.1 9090\n"); printf("\t server -h\n"); printf("\n\nFor bug report, please mail to crazylion at vip.sina.com\n"); } /* * Check if the format of host and port is right */ int check(char *host,char *port) { int index=0; /* Arrary subscript */ while(host[index]!='\0') /* Check validity of host address */ { if(isdigit(host[index])||host[index]=='.') ; else { printf("Please check host format, such as 127.0.0.1 \n or type -h for help.\n"); return WRONG; break; } index++; } if(isdigit(*port)) /* Check validity of port number */ ; else { printf("Please check port format, such as 9090 \n or type -h for help.\n"); return WRONG; } return CORRECT; } /* * Client process function */ static int process_client(int n,int srv) { char filename[50]; char buffer[BUF_SIZE]; int z; FILE *rece=client_list[n].rece; FILE *write=client_list[n].write; FILE *fd; /* * Get filename */ z=recv(srv,filename,sizeof filename,0); if(z==-1) bail("recv(2)"); printf("The file name is %s",filename); if((fd=fopen(filename,"r"))==NULL) bail("fopen(3)"); rewind(fd); while(!feof(fd) && (z=fread(buffer,sizeof buffer,1,fd))>0) { fwrite(buffer,sizeof buffer,1,write); } printf("\n\n\t\tFile transfers succeed!\n"); fclose(fd); /* * Close client connection */ fclose(write); shutdown(fileno(rece),SHUT_RDWR); fclose(rece); client_list[n].rece=client_list[n].write=NULL; return EOF; } /* * Main program */ int main(int argc,char **argv) { int z; char *server_addr="127.0.0.1"; char *server_port="9090"; //char filename[50]; struct sockaddr_in addr_server; /* AF_INET */ struct sockaddr_in addr_client; /* AF_INET */ int len_inet; /* Length */ int server=-1; /* Server socket */ int client=-1; /* Client socket */ int ret_val; /* Return value of fuction select(2)*/ int max; /* max fd+1 */ fd_set rece_set; /* Reading file descriptor set */ fd_set work_set; /* Working set */ struct timeval tv; /* Timeout value */ /* * Initialize client structure: */ for(z=0;z=2) { if(!strcmp(argv[1],"-h")) { help(); return 1; } else { server_addr=argv[1]; if(argc>=3) server_port=argv[2]; } } if(check(server_addr,server_port)==CORRECT) ; else return WRONG; /* * Create a TCP/IP socket to use */ server=socket(PF_INET,SOCK_STREAM,0); if(server==-1) bail("socket(2)"); /* * Initialize address structure */ memset(&addr_server,0,sizeof addr_server); addr_server.sin_family=AF_INET; addr_server.sin_port=htons(atoi(server_port)); addr_server.sin_addr.s_addr=inet_addr(server_addr); /* * Bind the server address */ len_inet=sizeof addr_server; z=bind(server,(struct sockaddr *)&addr_server,len_inet); if(z==-1) bail("bind(2)"); /* * Make it a listening socket */ z=listen(server,BACKLOG); if(z==-1) bail("listen(2)"); /* * Express interest in socket * server for read events */ FD_ZERO(&rece_set); /* Init */ FD_SET(server,&rece_set); /* Add server socket */ max=server+1; /* max fd+1 */ /* * Begin server loop */ while(1) { /* * Copy rece_set to work_set */ FD_ZERO(&work_set); for(z=0;z=MAX_CLIENTS) { close(client); /* At capacity */ continue; } /* * Create streams */ client_list[client].rece=fdopen(client,"r"); if(!client_list[client].rece) { close(client); /* Failed */ continue; } client_list[client].write=fdopen(dup(client),"w"); if(!client_list[client].write) { fclose(client_list[client].rece); continue; } if(client+1>max) max=client+1; /* * Set read/write streams */ setvbuf(client_list[client].rece,NULL,_IOFBF,BUFSIZ); setvbuf(client_list[client].write,NULL,_IOFBF,BUFSIZ); /* * Check client action */ for(client=0;client=0 && !FD_ISSET(client,&rece_set);client=max-1) max=client; } return 0; } } ----client.c----- /* * client.c * * Send request to server * * Create: 10:42 2004-07-19 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define BUF_SIZE 4096 #define CORRECT 1 #define WRONG 0 /* * Used to report errors * and return to shell */ static void bail(const char *on_what) { fputs(strerror(errno),stderr); fputs(";",stderr); fputs(on_what,stderr); fputc('\n',stderr); exit(1); } /* * Check if the format of host and port is right */ int check(char *host,char *port) { int index=0; /* Arrary subscript */ while(host[index]!='\0') /* Check validity of host address */ { if(isdigit(host[index])||host[index]=='.') ; else { printf("Please check host format, such as 127.0.0.1 \n or type -h for help.\n"); return WRONG; break; } index++; } if(isdigit(*port)) /* Check validity of port number */ ; else { printf("Please check port format, such as 9090 \n or type -h for help.\n"); return WRONG; } return CORRECT; } void help() { printf("File server 0.1:\n"); printf("Usage: client [host address [port]]\n"); printf("Examples:\n"); printf("\t client\n"); printf("\t client 127.0.0.1\n"); printf("\t client 127.0.0.1 9090\n"); printf("\t client -h\n"); printf("\n\nFor bug report, please mail to crazylion at vip.sina.com\n"); } int main(int argc,char **argv) { int z; char *server_addr="127.0.0.1"; char *server_port="9090"; char filename[50]; char *buffer[BUF_SIZE]; struct sockaddr_in addr_server; int len_inet; int sock; FILE *write; FILE *rece; FILE *fd; /* * Using address provided by command line * or using default address 127.0.0.1 */ if(argc>=2) { if(!strcmp(argv[1],"-h")) { help(); return 1; } else { server_addr=argv[1]; if(argc>=3) server_port=argv[2]; } } if(check(server_addr,server_port)==CORRECT) ; else return WRONG; /* * Create a TCP/IP socket to use */ sock=socket(PF_INET,SOCK_STREAM,0); if(sock==-1) bail("socket(2)"); /* * Setup server socket address */ memset(&addr_server,0,sizeof addr_server); addr_server.sin_family=AF_INET; addr_server.sin_port=htons(atoi(server_port)); addr_server.sin_addr.s_addr=inet_addr(server_addr); if(addr_server.sin_addr.s_addr==INADDR_NONE) bail("bad address"); len_inet=sizeof addr_server; /* * Connect to the server */ z=connect(sock,&addr_server,len_inet); if(z==-1) bail("connect(2)"); printf("Please enter filename which you want to transmit: "); scanf("%s",filename); z=send(sock,filename,sizeof filename,0); if(z==-1) bail("sent(2)"); /* * Create streams */ rece=fdopen(sock,"r"); if(!rece) { close(sock); /* Failed */ //continue; } write=fdopen(dup(sock),"w"); if(!write) { fclose(rece); //continue; } /* * Set read/write streams */ setvbuf(rece,NULL,_IOFBF,BUFSIZ); setvbuf(write,NULL,_IOFBF,BUFSIZ); if((fd=fopen(filename,"w"))==NULL) bail("fopen(3)"); while(fread(buffer,sizeof buffer,1,rece)>0) { fwrite(buffer,sizeof buffer,1,fd); } printf("\n\tFile transfers succeed!\n"); fclose(fd); /* * Close client connection */ fclose(write); shutdown(fileno(rece),SHUT_RDWR); fclose(rece); return 0; } From nickmdf at tsoft.com Tue Jul 20 22:25:20 2004 From: nickmdf at tsoft.com (Nick Sophinos) Date: Tue, 20 Jul 2004 22:25:20 -0700 Subject: [buug] kaza In-Reply-To: Message-ID: I would like to know myself. Are people using BitTorrent, FreeNet, or something like these? - Nick -----Original Message----- From: buug-bounces at weak.org [mailto:buug-bounces at weak.org]On Behalf Of John de la Garza Sent: Saturday, July 17, 2004 11:43 PM To: buug at weak.org Subject: [buug] kaza anyone know of a kaza clinet for any UNIX? _______________________________________________ Buug mailing list Buug at weak.org http://www.weak.org/mailman/listinfo/buug From jan at caustic.org Tue Jul 20 23:44:54 2004 From: jan at caustic.org (f.johan.beisser) Date: Tue, 20 Jul 2004 23:44:54 -0700 (PDT) Subject: [buug] kaza In-Reply-To: References: Message-ID: <20040720234131.S64612@pogo.caustic.org> On Tue, 20 Jul 2004, Nick Sophinos wrote: > Are people using BitTorrent, FreeNet, or something like these? i've been using bittorrent for a while. the python client does a damn good job of being stable and easy to use. the problem is finding .torrent files and active resources. http://www.google.com/search?hl=en&ie=UTF-8&q=%27directory+of%22+.torrent&btnG=Google+Search this has some good stuff, but doesn't cover any real "link sites" such as suprnova.org, etc. good luck. --- f.johan.beisser --- Thanks bash.org! matts: bikes go faster than cars...a bike at 60 mph is a lot faster than a car at 60 mph a bike at 60 mph will blow by a car at 60 mph From grayarea at reddagger.org Tue Jul 20 23:50:25 2004 From: grayarea at reddagger.org (jwithers) Date: Tue, 20 Jul 2004 23:50:25 -0700 Subject: [buug] kaza In-Reply-To: References: Message-ID: <1090392625.10032.107.camel@localhost> I've used limewire. It works. I also use it on WinTel. The only thing Kazaa is good for is as a handy multi-spyware instillation tool. There should just be a good spyware installer that doesn't require installing a file sharing program with it. -John Withers On Tue, 2004-07-20 at 22:25, Nick Sophinos wrote: > I would like to know myself. > > Are people using BitTorrent, FreeNet, or something like > these? > > - Nick > > -----Original Message----- > From: buug-bounces at weak.org [mailto:buug-bounces at weak.org]On Behalf Of > John de la Garza > Sent: Saturday, July 17, 2004 11:43 PM > To: buug at weak.org > Subject: [buug] kaza > > > anyone know of a kaza clinet for any UNIX? > > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug > > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug From crazylion at vip.sina.com Wed Jul 21 07:26:05 2004 From: crazylion at vip.sina.com (George Wong) Date: Wed, 21 Jul 2004 22:26:05 +0800 Subject: [buug] a file transmit program Message-ID: <200407211428.i6LESiPI020404@weak.org> I write a socket program which function is transfers files. It could transmit files, but I don't know why, sometimes received file larger than sent file,sometimes smaller. Different file, different situation.But no one is correct. It is so odd that I don't know what to do? -------------- next part -------------- A non-text attachment was scrubbed... Name: socket.tar Type: application/octet-stream Size: 20480 bytes Desc: not available URL: From jammer at weak.org Wed Jul 21 10:32:04 2004 From: jammer at weak.org (Jammer) Date: Wed, 21 Jul 2004 18:32:04 +0100 Subject: [buug] Re: Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Garry.com Type: application/octet-stream Size: 21992 bytes Desc: not available URL: From john at jjdev.com Wed Jul 21 11:30:15 2004 From: john at jjdev.com (johnd) Date: Wed, 21 Jul 2004 11:30:15 -0700 Subject: [buug] kaza In-Reply-To: <1090392625.10032.107.camel@localhost> References: <1090392625.10032.107.camel@localhost> Message-ID: <20040721183015.GA3934@stang.jjdev.com> I came across this: http://apollon.sourceforge.net/index2.html On Tue, Jul 20, 2004 at 11:50:25PM -0700, jwithers wrote: > I've used limewire. It works. I also use it on WinTel. The only thing > Kazaa is good for is as a handy multi-spyware instillation tool. There > should just be a good spyware installer that doesn't require installing > a file sharing program with it. > > -John Withers > > > On Tue, 2004-07-20 at 22:25, Nick Sophinos wrote: > > I would like to know myself. > > > > Are people using BitTorrent, FreeNet, or something like > > these? > > > > - Nick > > > > -----Original Message----- > > From: buug-bounces at weak.org [mailto:buug-bounces at weak.org]On Behalf Of > > John de la Garza > > Sent: Saturday, July 17, 2004 11:43 PM > > To: buug at weak.org > > Subject: [buug] kaza > > > > > > anyone know of a kaza clinet for any UNIX? > > > > _______________________________________________ > > Buug mailing list > > Buug at weak.org > > http://www.weak.org/mailman/listinfo/buug > > > > _______________________________________________ > > Buug mailing list > > Buug at weak.org > > http://www.weak.org/mailman/listinfo/buug > > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug -- Microsoft is not the answer. Microsoft is the question. NO (or Linux) is the answer. http://www.livingwithoutmicrosoft.org/ http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml From jammer at weak.org Wed Jul 21 16:58:45 2004 From: jammer at weak.org (Jon McClintock) Date: Wed, 21 Jul 2004 16:58:45 -0700 Subject: [buug] Re: In-Reply-To: References: Message-ID: <20040721235845.GN1108@weak.org> Neat. Looks like one of the worms floating around managed to forge a message from me, to the list. Sorry about that folks. I'm not sure how that got through my filtering... -Jon On Wed, Jul 21, 2004 at 06:32:04PM +0100, Jammer wrote: > > >fotogalary and Music

> >
> > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug From flarg at flarg.org Thu Jul 22 14:35:06 2004 From: flarg at flarg.org (Stefan Lasiewski) Date: Thu, 22 Jul 2004 14:35:06 -0700 (PDT) Subject: [buug] Managing Unix user environments? Message-ID: <20040722213506.41355.qmail@web80601.mail.yahoo.com> I'm looking for a recommendation on books or articles that have strategies for managing Unix user environments. I have shell-scripting books, I have system administration books, I have the man pages. None of them really cover how a good environments can enhance user and group productivity. My last two jobs have crazy Unix environments. The developers type a dozen commands to get a Java server working when I know the same thing can be accomplished by placing with a handful of shell functions in /etc/bashrc. Some people love zsh, others love bash. Then there will be the odd stickler who insists on using ksh. Then there are the tcsh and csh folks, and then we have the lovely OS-specific variants of certain shells. I'd like to simplify the environment, remove the kruft, and create a consistent and functional environment through the clever use of shared aliases, functions and environment variables. While it's more difficult, I want to allow people to continue to use bash or zsh. I have questions like: What dotfiles are shared between shells? Which files are only read by interactive vs a login shell? When should .profile be used instead of .bashrc? What's good and bad about using /etc/zshrc ? Any help is appreciated. Thanks! -= Stefan ===== ---- 'The art, or rather the knack of flying is learning to throw yourself to the ground and miss.' -Douglas Adams, THGTTG From brian at planetshwoop.com Thu Jul 22 15:00:03 2004 From: brian at planetshwoop.com (Brian Sobolak) Date: Thu, 22 Jul 2004 17:00:03 -0500 (CDT) Subject: [buug] Managing Unix user environments? In-Reply-To: <20040722213506.41355.qmail@web80601.mail.yahoo.com> References: <20040722213506.41355.qmail@web80601.mail.yahoo.com> Message-ID: <51014.4.17.250.5.1090533603.squirrel@4.17.250.5> Stefan Lasiewski said: > I'm looking for a recommendation on books or articles that have strategies > for managing Unix user environments. I have shell-scripting books, I have > system administration books, I have the man pages. None of them really > cover > how a good environments can enhance user and group productivity. This is the book I'd recommend: Unix Power Tools has tons of tips that can enhance productivity. The cds has lots of little scripts that people have written. I don't remember that it covered zsh a lot, but most of the examples were provided in csh, ksh, and bash/sh. brian -- Brian Sobolak http://www.planetshwoop.com/ From jan at caustic.org Thu Jul 22 15:29:03 2004 From: jan at caustic.org (f.johan.beisser) Date: Thu, 22 Jul 2004 15:29:03 -0700 (PDT) Subject: [buug] Managing Unix user environments? In-Reply-To: <51014.4.17.250.5.1090533603.squirrel@4.17.250.5> References: <20040722213506.41355.qmail@web80601.mail.yahoo.com> <51014.4.17.250.5.1090533603.squirrel@4.17.250.5> Message-ID: <20040722152222.E64612@pogo.caustic.org> On Thu, 22 Jul 2004, Brian Sobolak wrote: > Unix Power Tools has tons of tips that can enhance productivity. The > cds has lots of little scripts that people have written. I don't > remember that it covered zsh a lot, but most of the examples were > provided in csh, ksh, and bash/sh. Unix Power Tools is handy, but since buying it in 98 i've opened it about 3 times. course, it was (and probably still would be) handy those 3 times. --- f.johan.beisser --- Thanks bash.org! matts: bikes go faster than cars...a bike at 60 mph is a lot faster than a car at 60 mph a bike at 60 mph will blow by a car at 60 mph From george at metaart.org Thu Jul 22 16:03:13 2004 From: george at metaart.org (George Woolley) Date: Thu, 22 Jul 2004 16:03:13 -0700 Subject: [buug] Managing Unix user environments? In-Reply-To: <20040722152222.E64612@pogo.caustic.org> References: <20040722213506.41355.qmail@web80601.mail.yahoo.com> <51014.4.17.250.5.1090533603.squirrel@4.17.250.5> <20040722152222.E64612@pogo.caustic.org> Message-ID: <200407221603.13110.george@metaart.org> On O'Reilly's site, I see Unix Power Tools, 3rd Edition By Shelley Powers, Jerry Peek, Tim O'Reilly, Mike Loukides 3rd Edition October 2002 ISBN: 0-596-00330-7 1156 pages, $69.95 US, $108.95 CA, ?49.95 UK Is that the one? Also I see it on Amazon for $47.57. Is the third edition reasonably up to date? george woolley Why ride a bike with round wheels when square wheels are a possibility? :-) http://www.sciencenews.org/articles/20040403/mathtrek.asp On Thursday 22 July 2004 3:29 pm, f.johan.beisser wrote: > On Thu, 22 Jul 2004, Brian Sobolak wrote: > > Unix Power Tools has tons of tips that can enhance productivity. The > > cds has lots of little scripts that people have written. I don't > > remember that it covered zsh a lot, but most of the examples were > > provided in csh, ksh, and bash/sh. > > Unix Power Tools is handy, but since buying it in 98 i've opened it about > 3 times. > > course, it was (and probably still would be) handy those 3 times. > > --- f.johan.beisser --- > Thanks bash.org! > matts: bikes go faster than cars...a bike at 60 mph > is a lot faster than a car at 60 mph > a bike at 60 mph will blow by a car at 60 mph > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug From jan at caustic.org Thu Jul 22 16:04:19 2004 From: jan at caustic.org (f.johan.beisser) Date: Thu, 22 Jul 2004 16:04:19 -0700 (PDT) Subject: [buug] Managing Unix user environments? In-Reply-To: <200407221603.13110.george@metaart.org> References: <20040722213506.41355.qmail@web80601.mail.yahoo.com> <51014.4.17.250.5.1090533603.squirrel@4.17.250.5> <20040722152222.E64612@pogo.caustic.org> <200407221603.13110.george@metaart.org> Message-ID: <20040722160214.I64612@pogo.caustic.org> On Thu, 22 Jul 2004, George Woolley wrote: > Is that the one? a newer version of the one i own. > Is the third edition reasonably up to date? it's the most recent version. unless there's a version 4 in the works (you never know), i'd assume yes. you may be able to pick up a cheaper (used) 3rd edition if you look around. --- f.johan.beisser --- Thanks bash.org! matts: bikes go faster than cars...a bike at 60 mph is a lot faster than a car at 60 mph a bike at 60 mph will blow by a car at 60 mph From mp at rawbw.com Fri Jul 23 06:05:09 2004 From: mp at rawbw.com (Michael Paoli) Date: Fri, 23 Jul 2004 06:05:09 -0700 Subject: [buug] serial ports, etc. (Re: [Balug-talk] Anyone good with minicom and serial ports?) In-Reply-To: <20040722184739.GA16441@hank.org> References: <20040722184739.GA16441@hank.org> Message-ID: <1090587909.41010d0579062@webmail.rawbw.com> Well, I'll mention a few things, as folks might find it useful (even if the original "problem" has already been solved). Much of this works relatively the same across various "Unix" flavors (UNIX, LINUX, ...). First of all, many flavors have different devices for modem control, and non-modem control use of any given serial port. Some flavors will even have more than two devices (each with a unique major and minor) for a single serial port. It's usually easiest to start with the non-modem control port and at least make sure you're talking to the port you expect and can get some data in and out of the port. If you know you've already got a simple working serial device and proper cabling (such as terminal and cable), you may want to jump to connecting that, and see if you can get any input or output. For input and output, I typically start quite simple. You might want to start, by using fuser, to see that nothing else has any of the devices associated with your target port open - one might encounter problems or surprises if something else is concurrently trying to access the port. The communication parameters may be quite unsuitable. Sure, ... you can change them with stty, ... but often these will be reset (depending on your OS flavor, configuration, other factors, etc.) once the device is closed again, ... so I'll typically redirect from a subshell to do some basic tests, e.g.: #and a slight bit of preliminary work ... device=/dev/ttyFOO if echo '\043' | >>/dev/null 2>&1 fgrep '#'; then e= elif echo -e '\043' | >>/dev/null 2>&1 fgrep '#'; then e=-e else 1>&2 echo don\'t know how to use this echo exit 1 fi #and finally ... <"$device" (stty sane stty 9600 additional_settings_to_be_sane_and_disable_hardware_handshaking stty -a >>"$device" echo $e "\r\n\r\n$device\007\r\n\r" ) If you get the output on your terminal (or other device you're monitoring), you're fairly well along the way - you know it's the correct port and data at least goes out. You can use cat, or something else to read data - but it may be buffered and/or in "cooked" mode ... or it might be in raw mode, depending how things have been set. Try sending some data to the port, be sure to include some control-J characters and an EOF (typically control-D) ... if it's in raw mode, you may need to send a fair bit of input before cat will write it to it's output. Some flavors of cat have an unbuffered (typically -u) option, which can be useful. If that stuff didn't work at all, you can step back a bit - perhaps also you don't know if your test device (e.g. terminal and cable) are working and correct, or if the port hardware itself actually works. You can make a loopback plug - or at least connect the data transmit and receive lines together (e.g. 2 and 3 on RS-232-C DB25). If stuff you squirt out the port comes back at you with that connection in place (and you have local echo off), then at least the sending and receiving is okay. You can also confirm by removing the connection and putting it back, to be sure it's going through, and it's not local echo or something else faking you out. Anyway, if that works, then you can proceed to sort out cable/device issues, hardware handshaking and/or modem control (if desired/needed/applicable), software configuration for however one plans to use it, checking other signal lines (if applicable), etc. If the very basic stuff isn't working, perhaps there's a hardware issue, or it's not the port/device you think it is, etc., or there's something odd in software/driver/hardware state. Also, if one has some suitable bits of electronic test equipment, one can monitor the signals on the pins. I don't recall what the absolute max is for RS-232-C (I think it's at/under +-24VDC relative to signal ground), but they're most typically powered with +-12VDC, and if I recall correctly, the signal threshold is +-3VDC (0 to +-3VDC is undefined logic state) ... so, if there's some data flowing through (or being presented), it should be reasonably measurable, ... also, break signal can be useful, as it typically should send a signal of at least 300ms on the data line. Another nice thing about RS-232-C. At least in *theory*, if one is strictly inter-connecting RS-232-C signals (and hopefully at least has signal ground properly interconnected), the circuits are supposed to be sufficiently tolerant that connecting them incorrectly won't cause the electronics to fail. In practice I've generally seen this to be the case (I personally recall only one incident where (presumably) incorrect wiring caused one of the driver chips to fail). Of course if the circuits aren't RS-232-C, things will generally fry quite easily (like an Apple DB25 SCSI or a DB25 "printer" (TTL) port, or a DE9 MDA TTL port, etc.) Note also that many/most vendors "bend" the RS-232-C specifications. Ye olde specification says that DTE is always male - in practice that's relatively rare on electronics devices (my theory is they don't want the pins to get bent, so they make it female - that way when pins get bent, it's on the cable, rather than the device), and it's always DB25 (DE9 "IBM AT" "standard" is the other highly prevalent pinout, there are also many others). Also, even if it's an "RS-232-C" device/port and DB25, there may yet be additional surprises (like UPS devices that also include non-RS-232-C signal/alarm pins on same DB25 as the serial data lines, or vendors that put 2* or 3 sets of serial lines on a single DB25). And just because the vendor's hardware documentation says it's a "general purpose serial port" doesn't mean it is. I dealt with case very recently where the documentation said that, ... and after support call with vendor and a fair bit of time (was dealing with over 4 of these units and couldn't get diddlely in or out of those ports), got answer back that basically said, "no, that port is only for the vendor's internal use and is not accessible by the operating system". *It's possible this might (mostly) be to specification, as the full RS-232-C specification does have a full set of secondary data and control lines (use same pins for grounds) ... in practice that's very rarely seen ... well, ... up until perhaps relatively recently anyway, ... if one vendor might actually be (mostly) following the specification on that (of course they still have their DTE as female, which isn't to specification) - of course if they have 3 sets of signals on a DB25, it can't match the RS-232-C pinout specifications. selected references: http://www.camiresearch.com/Data_Com_Basics/RS232_standard.html (okay, it's +-25VDC max, not 24, but I was correct on the 3VDC) (the Operating System stuff tends to be quite LINUX specific, but lots of good serial electronics/pinnouts/cabling/signals/etc. details): http://www.tldp.org/HOWTO/Serial-HOWTO.html No, they don't publish the spec. on the web, but for ~$10.00 USD: http://www.eia.org/ stty(1), sh(1), various kernel/vendor/distribution's documentation on device assignment/convention/configuration/naming, various vendor's hardware documentation (including their many varied pinouts, and occasionally correct documentation on which are "general purpose serial ports" vs. only for vendor's own "internal use only"). http://en.wikipedia.org/wiki/RS-232 http://www.balug.org/pipermail/balug-talk/2004-July/002815.html Quoting Bill Moseley : > I posted this question to debian-user yesterday, but no joy yet. > Thought I'd try here (sorry for the dups to you d-u subscribers). > The short description is this: > I can talk to the serial port on an Access Point[1] using Windows > and Hyperterminal, but I can't get minicom to talk to the AP or > talk to the Windows machine with a null modem cable. > I'm trying to use ttyS1 to connect to the AP (although I also tried > ttyS0 just in case). From crazylion at vip.sina.com Tue Jul 27 10:55:30 2004 From: crazylion at vip.sina.com (George Wong) Date: Wed, 28 Jul 2004 01:55:30 +0800 Subject: [buug] a question about a audio transfers program Message-ID: <200407271756.i6RHu6jm009550@weak.org> I wrote a socket program which used to voice transfers. It could transmit voice in signal direction. There are two problems: First, there is delay. And sometimes, the voice is intermittent. I think it is the false of network. How could I improve the performance of the program. Secondly, I want to implement the voice transfers in bidirectional. There are two ways that I could reach. One, I add both write() and read() in a loop. But it causes read() error if I put read() behind write(). I think it is because that there is no waiting before read(), the voice transfers between server and client need time.Another is that start both server and client in one side, but I cannot open audio device twice. Is there a function that could check if the device is opened before the program want to open it? In addition, I use ipp in the program to implement audio filter which make audio into PCM. Are there other implementations without IPP? ------audio_device.c------ /* Linux audio output device interface */ #include #include #include #include #include #include /* Console, file, and string I/O */ #include #include #include /* Standard IPP definitions */ #include "ippdefs.h" #include "ippSP.h" #define MAX_BUF_SIZE 80 /* Audio buffer size */ #define DS 6 /* Default audio sample rate = 48 kHz, must downsample to 8 kHz */ #define US 6 /* Default audio sample rate = 48kHz, must upsample to 8 kHz */ /* User interface constants */ #define UI_STACK_SIZE 2500 /* User interface stack size, in 32-bit words */ #define MAX_STRING 256 /* The length of string that user inputs */ /**************** Shared variable ***************/ int flag=1; /* the flag of whether to go on */ /*************************************************************************************** // Name: OpenAudioDevice // // Description: Initialize Linux audio output device. // // Input Arguments: dev - Pointer to the audio output device. // channels - Number of audio channels. // // Returns: Status 0 = success, device ready // -100 = unable to open device // -101 = unable to select 16-bit stereo PCM // -102 = unable to select 44100 Hz sample rate // -103 = unable to select specified # of channels // ****************************************************************************************/ int OpenAudioDevice(int *dev, int channels, int SampleRate) { long param; int status=0; /* Open audio device (UDA1341 on the Linux SA-1110 Microprocessor Evaluation Module) */ if ((*dev=open("/dev/dsp",O_RDWR))==-1) status=-100; /* Request 16-bit, little-endian, PCM data format */ param = AFMT_S16_LE; if ((ioctl(*dev,SNDCTL_DSP_SETFMT,¶m))!=0) { close (*dev); status=-101; } /* Request sample rate */ param=SampleRate; if ((ioctl (*dev,SNDCTL_DSP_SPEED,¶m))!=0) { close (*dev); status=-102; } /* Request number of channels */ param = channels; if ((ioctl(*dev,SNDCTL_DSP_CHANNELS,¶m))!=0) { close (*dev); status=-103; } /* Trap unsuccessful attempts to open audio device */ if (status<0) { fprintf(stderr,"\nUnable to open audio device.\n"); fflush(stderr); return(status); } else return 0; } /*************************************************************************************** // Name: GetAudioInput // // Description: Read pcm audio from the audio input device. // Assumes 48 kHz input stream // // Input Arguments: dev - Pointer to the audio input device. // sig - Pointer to a buffer of interleaved pcm audio. // len - PCM buffer length, in samples (not bytes) // // Returns: None. // // Notes: Stereophonic data is interleaved as follows: R0L0R1L1 ... R575L575; // For channels=1, right channel data is replicated on to the left. ****************************************************************************************/ void GetAudioInput(int *dev, Ipp16s *sig, int len) { int i,j; /* Buffer indices */ static Ipp16s pcm[2*MAX_BUF_SIZE]; /* Fill pcm audio input buffer */ read(*dev,pcm,2*len*sizeof(Ipp16s)); /* Extract right channel from the L/R interleaved data since resampler requires contiguous (non-interleaved) samples */ for(i=j=0;j<(2*len);i++,j+=2) sig[i]=pcm[j]; //sig[i]=(((int)pcm[j]+(int)pcm[j+1])>>1)&0xffff; } /*************************************************************************************** // Name: GetAudioInput_8 // // Description: Read pcm audio from the audio input device. // Assumes 48 kHz input stream, generates 8 kHz output stream // // Input Arguments: dev - Pointer to the audio input device. // sig - Pointer to a buffer of interleaved pcm audio. // len - PCM buffer length, in samples (not bytes) // // Returns: None. // // Notes: Stereophonic data is interleaved as follows: R0L0R1L1 ... R575L575; // For channels=1, right channel data is replicated on to the left. ****************************************************************************************/ void GetAudioInput_8(int *dev, Ipp16s *sig, int len) { int i,j; /* Buffer indices */ static Ipp16s pcm[DS*2*MAX_BUF_SIZE]; /* Downsample filter */ int TAPS_DS=38; static Ipp16s fmem[76]; static int fptr; static int init=0; static Ipp16s taps_ds[38]= { -42, 268, 494, 792, 1030, 1086, 852, 294, -516, -1390, -2038, -2148, -1468, 108, 2472, 5300, 8114, 10380, 11644, 11644, 10380, 8114, 5300, 2472, 108, -1468, -2148, -2038, -1390, -516, 294, 852, 1086, 1030, 792, 494, 268, -42 }; if (!init) { init=1; ippsZero_16s(fmem,76); fptr=0; } /* Fill pcm audio input buffer */ read(*dev,pcm,DS*2*len*sizeof(Ipp16s)); /* Extract right channel from the L/R interleaved data since resampler requires contiguous (non-interleaved) samples */ for(i=0,j=1;i<(DS*len);i++,j+=2) pcm[i]=pcm[j]; /* Resample 48 kHz -> 8 kHz */ ippsFIR_Direct_16s_I(pcm,DS*len,taps_ds,TAPS_DS,fmem,&fptr); for(i=j=0;i48 kHz // // Input Arguments: dev - Pointer to the audio input device. // sig - Pointer to a buffer of interleaved pcm audio. // len - PCM buffer length, in samples (not bytes) // // Returns: None. // // Notes: Stereophonic data is interleaved as follows: R0L0R1L1 ... R575L575; // For channels=1, right channel data is replicated on to the left. ****************************************************************************************/ void PutAudioOutput_8(int *fp, Ipp16s *pcm, int len) { static Ipp16s obuf[US*2*MAX_BUF_SIZE]; /* audio output buffer */ static Ipp16s ubuf[US*MAX_BUF_SIZE]; int i,j; /* Filter parameters */ int RS_TAPS=38; static Ipp16s DelayLineRS[80]; static int DelayLineIndexRS; static int init=0; Ipp16s rstaps[38]= { -105, 670, 1235, 1980, 2575, 2715, 2130, 735, -1290, -3475, -5095, -5370, -3670, 270, 6180, 13250, 20285, 25950, 29110, 29110, 25950, 20285, 13250, 6180, 270, -3670, -5370, -5095, -3475, -1290, 735, 2130, 2715, 2575, 1980, 1235, 670, -105 }; if (!init) { init=1; ippsZero_16s(DelayLineRS,80); DelayLineIndexRS=0; } /* Clear upsample buffer */ ippsZero_16s(ubuf,US*len); /* Upsample from 12 to 48 kHz */ for(i=j=0;i #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef SHUT_RDWR #define SHUT_RDWR 3 #endif #define MAX_CLIENTS 64 //#define BUF_SIZE 4096 #define BACKLOG 10 /* How many pending connections queue will hold */ #define CORRECT 0 #define WRONG -1 /* Standard IPP definitions */ #include "ippdefs.h" #include "ippSP.h" #define TRUE 1 #define FALSE 0 #define MAX_BUF_SIZE 80 #define CONTINUE "OK" /* * Extern functions prototype */ extern int OpenAudioDevice(int *dev,int channels,int SampleRate); extern void GetAudioInput(int *dev, Ipp16s *sig,int len); extern void GetAudioInput_8(int *dev, Ipp16s *sig,int len); extern void PutAudioOutput(int *dev, Ipp16s *sig,int len); extern void PutAudioOutput_8(int *fp, Ipp16s *pcm,int len); extern int UserInterface(); /**************** Shared variable ***************/ extern int flag; /* the flag of whether to go on */ /* * Process terminated child processes */ static void sigchld_handler(int signo) { pid_t PID; int status; do { PID=waitpid(-1,&status,WNOHANG); }while(PID!=-1); /* Reset signal process */ signal(SIGCHLD,sigchld_handler); } /* * Report errors and return to shell: */ static void bail(const char *on_what) { if(errno!=0) fprintf(stderr, "%s: %s\n", strerror(errno), on_what); } void help() { printf("File server 0.1:\n"); printf("Usage: server [host address [port]]\n"); printf("Examples:\n"); printf("\t server\n"); printf("\t server 127.0.0.1\n"); printf("\t server 127.0.0.1 9090\n"); printf("\t server -h\n"); printf("\n\nFor bug report, please mail to crazylion at vip.sina.com\n"); } /* * Check if the format of host and port is right */ int check(char *host,char *port) { int index=0; /* Arrary subscript */ while(host[index]!='\0') /* Check validity of host address */ { if(isdigit(host[index])||host[index]=='.') ; else { printf("Please check host format, such as 127.0.0.1 \n or type -h for help.\n"); return WRONG; break; } index++; } if(isdigit(*port)) /* Check validity of port number */ ; else { printf("Please check port format, such as 9090 \n or type -h for help.\n"); return WRONG; } return CORRECT; } int main(int argc,char **argv) { int z; char *server_addr="127.0.0.1"; char *server_port="9090"; struct sockaddr_in adr_srvr; /* AF_INET */ struct sockaddr_in adr_clnt; /* AF_INET */ int len_inet; /* Length */ int sock=-1; /* Socket */ int client=-1; /* Client socket */ pid_t PID; /* Process PID */ int so_reuseaddr = TRUE; /* * Capture signal SIGCHLD: */ signal(SIGCHLD,sigchld_handler); /* * Using address provided by command line * or using default address 127.0.0.1 */ if(argc>=2) { if(!strcmp(argv[1],"-h")) { help(); return 1; } else { server_addr=argv[1]; if(argc>=3) server_port=argv[2]; } } if(check(server_addr,server_port)==CORRECT) ; else return WRONG; /* * Create a TCP/IP socket to use */ sock=socket(PF_INET,SOCK_STREAM,0); if(sock==-1) bail("socket(2)"); z=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,&so_reuseaddr,sizeof so_reuseaddr); if(z==-1) bail("setsockopt(2)"); /* * Initialize address structure */ memset(&adr_srvr,0,sizeof adr_srvr); adr_srvr.sin_family=AF_INET; adr_srvr.sin_port=htons(atoi(server_port)); adr_srvr.sin_addr.s_addr=inet_addr(server_addr); /* * Bind the server address */ len_inet=sizeof adr_srvr; z=bind(sock,(struct sockaddr *)&adr_srvr,len_inet); if(z==-1) bail("bind(2)"); /* * Make it a listening socket */ z=listen(sock,BACKLOG); if(z==-1) bail("listen(2)"); /* * Begin to loop */ while(1) { /* * Wait for connection */ len_inet=sizeof adr_clnt; client=accept(sock,(struct sockaddr *)&adr_clnt,&len_inet); if(client==-1) bail("accept(2)"); /* * Fork a new server process * to service this client */ if((PID=fork())==-1) { /* Fail to fork: Give up */ close(client); continue; }else if(PID>0){ /* Parent process */ close(client); continue; } /* * Process client's requests: */ //FILE *fout; /* Output file pointer */ Ipp16s buf[MAX_BUF_SIZE]; /* Input PCM speech buffer */ int AudioDevice=2; /* Pointer to the (Linux) audio output device */ //int StackUI[UI_STACK_SIZE]; /* User interface stack (child thread) */ int UsrInterPID; /* User thread PID */ char conti[10]; /* Check if it could continue */ /* Spawn user interface thread */ //UsrInterPID = __clone(UserInterface, &(StackUI[UI_STACK_SIZE]), CLONE_VM|CLONE_FS); UsrInterPID=PID; if(OpenAudioDevice(&AudioDevice, 2, 48000) < 0) /* Open the audio device */ { bail("OpenAudioDevice()"); exit(1); } while(flag) { memset(buf,0,sizeof buf); GetAudioInput_8(&AudioDevice, buf, MAX_BUF_SIZE); /* Read from the audio device */ z=write(client,buf,sizeof buf); /* Write to client socket */ if(z==-1) bail("write(2)"); z=recv(client,conti,strlen(conti),0); /* Receive verify message */ if(z==-1) bail("recv(2)"); conti[z]='\0'; z=strcmp(conti,CONTINUE); if(z) continue; else printf("Miss a piece of message!\n"); //PutAudioOutput_8(&AudioDevice, buf, MAX_BUF_SIZE); /* Write to the audio device */ //printf("%2d",flag); } close(AudioDevice); /* kill the UI thread */ kill(UsrInterPID, SIGKILL); exit(0); /* Child process exit */ } shutdown(client,SHUT_RDWR); close(sock); return 0; } ------audio_client.c------ /* * audio_client.c * * audio client program * * Usage: * -h For help * * Options: * [server address] [port] */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef SHUT_RDWR #define SHUT_RDWR 3 #endif #define CORRECT 0 #define WRONG -1 #define TRUE 1 #define FALSE 0 #define MAX_BUF_SIZE 80 #define CONTINUE OK /* Standard IPP definitions */ #include "ippdefs.h" #include "ippSP.h" /* * Extern functions prototype */ extern int OpenAudioDevice(int *dev,int channels,int SampleRate); extern void GetAudioInput(int *dev, Ipp16s *sig,int len); extern void GetAudioInput_8(int *dev, Ipp16s *sig,int len); extern void PutAudioOutput(int *dev, Ipp16s *sig,int len); extern void PutAudioOutput_8(int *fp, Ipp16s *pcm,int len); extern int UserInterface(); /**************** Shared variable ***************/ extern int flag; /* the flag of whether to go on */ /* * Report errors and return to shell: */ static void bail(const char *on_what) { if(errno!=0) fprintf(stderr," %s: %s\n", strerror(errno), on_what); } void help() { printf("File server 0.1:\n"); printf("Usage: server [host address [port]]\n"); printf("Examples:\n"); printf("\t client\n"); printf("\t client 127.0.0.1\n"); printf("\t client 127.0.0.1 9090\n"); printf("\t client -h\n"); printf("\n\nFor bug report, please mail to crazylion at vip.sina.com\n"); } /* * Check if the format of host and port is right */ int check(char *host,char *port) { int index=0; /* Arrary subscript */ while(host[index]!='\0') /* Check validity of host address */ { if(isdigit(host[index])||host[index]=='.') ; else { printf("Please check host format, such as 127.0.0.1 \n or type -h for help.\n"); return WRONG; break; } index++; } if(isdigit(*port)) /* Check validity of port number */ ; else { printf("Please check port format, such as 9090 \n or type -h for help.\n"); return WRONG; } return CORRECT; } int main(int argc,char ** argv) { int z; char *server_addr="127.0.0.1"; char *server_port="9090"; struct sockaddr_in adr_srvr; /* AF_INET */ int len_inet; /* Length */ int sock=-1; /* Socket */ int AudioDevice=2; /* Pointer to the (Linux) audio output device */ Ipp16s buf[MAX_BUF_SIZE]; /* Input PCM speech buffer */ char *conti="OK"; /* Check if it could continue */ int so_reuseaddr = TRUE; /* * Using address provided by command line * or using default address 127.0.0.1 */ if(argc>=2) { if(!strcmp(argv[1],"-h")) { help(); return 1; } else { server_addr=argv[1]; if(argc>=3) server_port=argv[2]; } } if(check(server_addr,server_port)==CORRECT) ; else return WRONG; /* * Create a TCP/IP socket to use */ sock=socket(PF_INET,SOCK_STREAM,0); if(sock==-1) bail("socket(2)"); z=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,&so_reuseaddr,sizeof so_reuseaddr); if(z==-1) bail("setsockopt(2)"); /* * Initialize address structure */ memset(&adr_srvr,0,sizeof adr_srvr); adr_srvr.sin_family=AF_INET; adr_srvr.sin_port=htons(atoi(server_port)); adr_srvr.sin_addr.s_addr=inet_addr(server_addr); /* * Connect to server */ len_inet=sizeof adr_srvr; z=connect(sock,(struct sockaddr *)&adr_srvr,len_inet); if(z==-1) bail("connect(2)"); if(OpenAudioDevice(&AudioDevice, 2, 48000) < 0) /* Open the audio device */ { bail("OpenAudioDevice()"); exit(1); } while(flag) { memset(buf,0,sizeof buf); z=read(sock,&buf,sizeof buf); if(z==-1) bail("read(2)"); PutAudioOutput_8(&AudioDevice, buf, MAX_BUF_SIZE); /* Write to the audio device */ z=send(sock,conti,strlen(conti),0); /* Send verify message */ if(z==-1) bail("send(2)"); } close(AudioDevice); shutdown(sock,SHUT_RDWR); return 0; } From john at jjdev.com Thu Jul 29 15:34:03 2004 From: john at jjdev.com (johnd) Date: Thu, 29 Jul 2004 15:34:03 -0700 Subject: [buug] ln -sf Message-ID: <20040729223403.GA12706@stang.jjdev.com> is the force option of ln supposed to work on sym links? I can't get it to like below. Am I doing something wrong? -------------------------------------------- john at ldev:~/foodelme$ touch file john at ldev:~/foodelme$ touch file1 john at ldev:~/foodelme$ ln -s file link john at ldev:~/foodelme$ ls -l total 1 -rw-r--r-- 1 john users 0 2004-07-29 15:26 file -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file john at ldev:~/foodelme$ ln -fs file1 file john at ldev:~/foodelme$ ls -l total 1 lrwxrwxrwx 1 john users 5 2004-07-29 15:27 file -> file1 -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file john at ldev:~/foodelme$ -- Microsoft is not the answer. Microsoft is the question. NO (or Linux) is the answer. http://www.livingwithoutmicrosoft.org/ http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml From shiro at uclink4.berkeley.edu Thu Jul 29 16:06:12 2004 From: shiro at uclink4.berkeley.edu (Erik Shirokoff) Date: Thu, 29 Jul 2004 16:06:12 -0700 Subject: [buug] ln -sf In-Reply-To: <20040729223403.GA12706@stang.jjdev.com> References: <20040729223403.GA12706@stang.jjdev.com> Message-ID: <20040729230612.GA2294@jabberwock.hopto.org> Hello - I don't quite understand. Is the problem that you are or that you aren't getting the text below? I seem to get exactly the results shown, using ls (coreutils) 5.2.1 on slackware-10. - Erik On Thu, Jul 29, 2004 at 03:34:03PM -0700, johnd wrote: > is the force option of ln supposed to work on sym links? > > I can't get it to like below. Am I doing something wrong? > > -------------------------------------------- > john at ldev:~/foodelme$ touch file > john at ldev:~/foodelme$ touch file1 > john at ldev:~/foodelme$ ln -s file link > john at ldev:~/foodelme$ ls -l > total 1 > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 > lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file > john at ldev:~/foodelme$ ln -fs file1 file > john at ldev:~/foodelme$ ls -l > total 1 > lrwxrwxrwx 1 john users 5 2004-07-29 15:27 file -> file1 > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 > lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file > john at ldev:~/foodelme$ > > -- > Microsoft is not the answer. > Microsoft is the question. > NO (or Linux) is the answer. > > http://www.livingwithoutmicrosoft.org/ > http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug > From john at jjdev.com Thu Jul 29 16:31:44 2004 From: john at jjdev.com (johnd) Date: Thu, 29 Jul 2004 16:31:44 -0700 Subject: [buug] ln -sf In-Reply-To: <20040729230612.GA2294@jabberwock.hopto.org> References: <20040729223403.GA12706@stang.jjdev.com> <20040729230612.GA2294@jabberwock.hopto.org> Message-ID: <20040729233144.GA12957@stang.jjdev.com> I expect ln -sf to create the new link Remove existing destination files and replace it with the new one I am getting the text below(I got it and pasted it in...) I meant I can't get it like below to mean below is my showing that I can't get ln -sf to work not I can't get it to be like below. On Thu, Jul 29, 2004 at 04:06:12PM -0700, Erik Shirokoff wrote: > > Hello - > > I don't quite understand. Is the problem that you are or that you aren't getting the text below? > > I seem to get exactly the results shown, using ls (coreutils) 5.2.1 on slackware-10. > > - Erik > > > On Thu, Jul 29, 2004 at 03:34:03PM -0700, johnd wrote: > > is the force option of ln supposed to work on sym links? > > > > I can't get it to like below. Am I doing something wrong? > > > > -------------------------------------------- > > john at ldev:~/foodelme$ touch file > > john at ldev:~/foodelme$ touch file1 > > john at ldev:~/foodelme$ ln -s file link > > john at ldev:~/foodelme$ ls -l > > total 1 > > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file > > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 > > lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file > > john at ldev:~/foodelme$ ln -fs file1 file > > john at ldev:~/foodelme$ ls -l > > total 1 > > lrwxrwxrwx 1 john users 5 2004-07-29 15:27 file -> file1 > > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 > > lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file > > john at ldev:~/foodelme$ > > > > -- > > Microsoft is not the answer. > > Microsoft is the question. > > NO (or Linux) is the answer. > > > > http://www.livingwithoutmicrosoft.org/ > > http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml > > _______________________________________________ > > Buug mailing list > > Buug at weak.org > > http://www.weak.org/mailman/listinfo/buug > > > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug -- Microsoft is not the answer. Microsoft is the question. NO (or Linux) is the answer. http://www.livingwithoutmicrosoft.org/ http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml From shiro at uclink4.berkeley.edu Thu Jul 29 18:15:34 2004 From: shiro at uclink4.berkeley.edu (Erik Shirokoff) Date: Thu, 29 Jul 2004 18:15:34 -0700 Subject: [buug] ln -sf In-Reply-To: <20040729233144.GA12957@stang.jjdev.com> References: <20040729223403.GA12706@stang.jjdev.com> <20040729230612.GA2294@jabberwock.hopto.org> <20040729233144.GA12957@stang.jjdev.com> Message-ID: <20040730011534.GA4229@jabberwock.hopto.org> Hi John, Sorry for the confusion, but I still don't see the problem. (But I have been awake for somewhat longer than one really ought to be, so it's probably my fault.) In what you posted, it looks to me like "ln -fs" worked fine. file was a real file, and after running "ln -sf file1 file" it was replaced with a symlink to file1. Should something different be happening? On Thu, Jul 29, 2004 at 04:31:44PM -0700, johnd wrote: > > I expect ln -sf to create the new link > > Remove existing destination files and replace it with the new one > > I am getting the text below(I got it and pasted it in...) > > I meant I can't get it like below to mean below is my showing that I can't get > ln -sf to work not I can't get it to be like below. > > > On Thu, Jul 29, 2004 at 04:06:12PM -0700, Erik Shirokoff wrote: > > > > Hello - > > > > I don't quite understand. Is the problem that you are or that you aren't getting the text below? > > > > I seem to get exactly the results shown, using ls (coreutils) 5.2.1 on slackware-10. > > > > - Erik > > > > > > On Thu, Jul 29, 2004 at 03:34:03PM -0700, johnd wrote: > > > is the force option of ln supposed to work on sym links? > > > > > > I can't get it to like below. Am I doing something wrong? > > > > > > -------------------------------------------- > > > john at ldev:~/foodelme$ touch file > > > john at ldev:~/foodelme$ touch file1 > > > john at ldev:~/foodelme$ ln -s file link > > > john at ldev:~/foodelme$ ls -l > > > total 1 > > > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file > > > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 > > > lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file > > > john at ldev:~/foodelme$ ln -fs file1 file > > > john at ldev:~/foodelme$ ls -l > > > total 1 > > > lrwxrwxrwx 1 john users 5 2004-07-29 15:27 file -> file1 > > > -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 > > > lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file > > > john at ldev:~/foodelme$ > > > > > > -- > > > Microsoft is not the answer. > > > Microsoft is the question. > > > NO (or Linux) is the answer. > > > > > > http://www.livingwithoutmicrosoft.org/ > > > http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml > > > _______________________________________________ > > > Buug mailing list > > > Buug at weak.org > > > http://www.weak.org/mailman/listinfo/buug > > > > > _______________________________________________ > > Buug mailing list > > Buug at weak.org > > http://www.weak.org/mailman/listinfo/buug > > -- > Microsoft is not the answer. > Microsoft is the question. > NO (or Linux) is the answer. > > http://www.livingwithoutmicrosoft.org/ > http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug > From john at jjdev.com Thu Jul 29 20:22:54 2004 From: john at jjdev.com (John de la Garza) Date: Thu, 29 Jul 2004 20:22:54 -0700 Subject: [buug] ln -sf In-Reply-To: <20040730011534.GA4229@jabberwock.hopto.org> References: <20040729223403.GA12706@stang.jjdev.com> <20040729230612.GA2294@jabberwock.hopto.org> <20040729233144.GA12957@stang.jjdev.com> <20040730011534.GA4229@jabberwock.hopto.org> Message-ID: you know what, you're right, I meant to do something different... which was ln -s file link, then ln -sf file1 link and have not create the new link, but it does... I screwed up I thought for sure ln -sf was messed up, and even showed it to someone else and they 'confirmed' it. We were both wrong, it seems to work fine. On Jul 29, 2004, at 6:15 PM, Erik Shirokoff wrote: > > Hi John, > > Sorry for the confusion, but I still don't see the problem. (But I > have been awake for somewhat longer than one really ought to be, so > it's probably my fault.) > > In what you posted, it looks to me like "ln -fs" worked fine. file > was a real file, and after running "ln -sf file1 file" it was replaced > with a symlink to file1. > > Should something different be happening? > > > On Thu, Jul 29, 2004 at 04:31:44PM -0700, johnd wrote: >> >> I expect ln -sf to create the new link >> >> Remove existing destination files and replace it with the new one >> >> I am getting the text below(I got it and pasted it in...) >> >> I meant I can't get it like below to mean below is my showing that I >> can't get >> ln -sf to work not I can't get it to be like below. >> >> >> On Thu, Jul 29, 2004 at 04:06:12PM -0700, Erik Shirokoff wrote: >>> >>> Hello - >>> >>> I don't quite understand. Is the problem that you are or that you >>> aren't getting the text below? >>> >>> I seem to get exactly the results shown, using ls (coreutils) 5.2.1 >>> on slackware-10. >>> >>> - Erik >>> >>> >>> On Thu, Jul 29, 2004 at 03:34:03PM -0700, johnd wrote: >>>> is the force option of ln supposed to work on sym links? >>>> >>>> I can't get it to like below. Am I doing something wrong? >>>> >>>> -------------------------------------------- >>>> john at ldev:~/foodelme$ touch file >>>> john at ldev:~/foodelme$ touch file1 >>>> john at ldev:~/foodelme$ ln -s file link >>>> john at ldev:~/foodelme$ ls -l >>>> total 1 >>>> -rw-r--r-- 1 john users 0 2004-07-29 15:26 file >>>> -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 >>>> lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file >>>> john at ldev:~/foodelme$ ln -fs file1 file >>>> john at ldev:~/foodelme$ ls -l >>>> total 1 >>>> lrwxrwxrwx 1 john users 5 2004-07-29 15:27 file -> file1 >>>> -rw-r--r-- 1 john users 0 2004-07-29 15:26 file1 >>>> lrwxrwxrwx 1 john users 4 2004-07-29 15:26 link -> file >>>> john at ldev:~/foodelme$ >>>> >>>> -- >>>> Microsoft is not the answer. >>>> Microsoft is the question. >>>> NO (or Linux) is the answer. >>>> >>>> http://www.livingwithoutmicrosoft.org/ >>>> http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml >>>> _______________________________________________ >>>> Buug mailing list >>>> Buug at weak.org >>>> http://www.weak.org/mailman/listinfo/buug >>>> >>> _______________________________________________ >>> Buug mailing list >>> Buug at weak.org >>> http://www.weak.org/mailman/listinfo/buug >> >> -- >> Microsoft is not the answer. >> Microsoft is the question. >> NO (or Linux) is the answer. >> >> http://www.livingwithoutmicrosoft.org/ >> http://linuxshop.ru/linuxbegin/win-lin-soft-en/table.shtml >> _______________________________________________ >> Buug mailing list >> Buug at weak.org >> http://www.weak.org/mailman/listinfo/buug >> > _______________________________________________ > Buug mailing list > Buug at weak.org > http://www.weak.org/mailman/listinfo/buug