Linux-Misc Digest #534, Volume #26               Tue, 12 Dec 00 20:13:01 EST

Contents:
  Re: how can i parse a config file ([EMAIL PROTECTED])
  Re: Lilo Li... problem. (John in SD)
  Re: What is the difference? (John Hasler)
  Re: qmail vs sendmail ([EMAIL PROTECTED])
  ISO 9660 Volume Name? (Andre-John Mas)
  Re: configuring CUPS print server (Sinner from the Prairy)
  Re: Lilo: hiding one partition and unhiding other when booting? (John in SD)
  Re: Is Linux/Mandrake good? ("Garry Knight")
  Re: Kernel (Glitch)
  Re: help: enlightenment as session manager ("nybblex")
  Re: how read from stdin in csh (Glitch)

----------------------------------------------------------------------------

From: [EMAIL PROTECTED]
Reply-to: [EMAIL PROTECTED]
Subject: Re: how can i parse a config file
Crossposted-To:  comp.os.linux.development.apps
Date: Wed, 13 Dec 2000 00:24:47 GMT

>>>>> "traykoff" == traykoff  <[EMAIL PROTECTED]> writes:
traykoff> Bruce Phipps <[EMAIL PROTECTED]> wrote:
>>> For a config file that is in the form

>> Have you any URLs for code which does this sort of thing?  Speaking
>> as someone who is learning C, loading/updating a config file is a
>> tremendously useful area to learn. Any example code is very
>> useful...

traykoff> A very useful tool for this is flex/bison.  This is esp true
traykoff> for config files which have rather complicated formats.  You
traykoff> specify a syntax for the config file, and match up the
traykoff> tokens to code.  Bison then creates a file with c code in it
traykoff> that will compile into an interpreter.  Flex is a lexical
traykoff> analyzer toolkit that can be used for breaking the input
traykoff> into the tokens.

traykoff> It is perhaps overkill for very simple config file formats.
traykoff> FOr these, just hack it.  Read the lines, figure out what
traykoff> they mean, and then store the section that you are in the
traykoff> file.  Read the lines in the section into the variables of
traykoff> interest.

I'd think this to be _almost certainly_ dramatic overkill; it seems to
me that it would be a whole lot more sensible to look to one of the
existing libraries that provides an API to a config file parser.

After all, if you "roll your own," you've got to:
 - Debug the parser
 - Make sure you've dealt with any locking issues
 - Make sure you've dealt with exceptions

Taking some existing library provides the possibility that these
issues may already have been worked through.  And with something like
libPropList, that provides a way of adding some metadata to the
configuration, there is the possibility of having the scheme be
cooperative with the config schemes for other programs.  

I'm not commending the [rather stupid] idea of having a "fragile
binary registry;" if there's a common metadata scheme, it is possible
to join sets of configuration together without breaking from the
benefits of using Unix text files [e.g. - rewriting files using
filters/shell scripts, source control via RCS/CVS, ...]

The URL below links to a number of such libraries.
-- 
(concatenate 'string "cbbrowne" "@hex.net")
<http://www.ntlug.org/~cbbrowne/linuxsysconfig.html#CONFIGDB>
Bushydo, the way of the shrub -- BONSAI!

------------------------------

From: John in SD <[EMAIL PROTECTED]>
Subject: Re: Lilo Li... problem.
Reply-To: [EMAIL PROTECTED]
Date: Wed, 13 Dec 2000 00:25:15 GMT

On a mixed SCSI / IDE system, there is doubt about how your BIOS assigns
device codes to the disk drives.  Normally, IDE is assigned 0x80, 0x81 ...,
then SCSI, IF IT IS SUPPORTED.

LILO uses only int 0x13 calls to load the system, so it must be able to map
/dev/[sh]d[abc] to device codes.  On a pure IDE system, it knows how these
codes are assigned; on a pure SCSI system, it also knows how these codes are
assigned.  On a mixed system, it has no idea.

You may need "disk=" / "bios=" entries in lilo.conf to get LILO in sync with
your BIOS.

See the documentation for LILO 21.6 at:

   ftp://brun.dyndns.org/pub/linux/lilo

--John




On Fri, 17 Nov 2000 17:18:47 GMT, [EMAIL PROTECTED] (Thaddeus L Olczyk)
wrote:

>I've got a system with a SCSI hard drive. I just added a second drive
>this time IDE.
>After tweeking my NT install, I reboot to discover I get a kernel
>panic. OK no problem, I added the hard rive to get more space for
>linux so instead of fixing the problenm and then shuffling files
>between partitions I just reinstall linux ( Mandrake 7.1) from
>scratch.
>
>When I boot I see Li appear on the bottom then nothing.
>OK, I use System Commander which was overwritten by Linux.
>I reinstall System Commander. Use an emergency boot disk to boot
>into linux. Change the boot to /dev/sda9 in lilo.conf reinstall.
>When I boot, it prints LI then freeses ( PS hard drive 9 gigs,
>last 2 gigs are an NT partition, so that I'm within 8g).
>The only clue I get is that lilo prints a warning that /dev/sda9
>is not on the first disk.
>
>Any ideas?
>----------------Lilo file------------------------------------
>boot=/dev/sda9
>map=/boot/map
>install=/boot/boot.b
>vga=normal
>default=linux
>keytable=/boot/us.klt
>lba32
>message=/boot/message
>prompt
>image=/boot/vmlinuz-smp
>       label=linux
>       root=/dev/sda11
>       initrd=/boot/initrd-smp.img
>       read-only
>image=/boot/vmlinuz
>       label=linux-up
>       root=/dev/sda11
>       initrd=/boot/initrd.img
>       read-only
>image=/boot/vmlinuz
>       label=failsafe
>       root=/dev/sda11
>       initrd=/boot/initrd.img
>       append=" failsafe"
>       read-only


LILO version 21.6 (04-Oct-2000) source at
http://www.ibiblio.org/pub/Linux/system/boot/lilo
patches at ftp://brun.dyndns.org/pub/linux/lilo

------------------------------

From: John Hasler <[EMAIL PROTECTED]>
Subject: Re: What is the difference?
Date: Tue, 12 Dec 2000 22:31:14 GMT

Harlan Grove writes:
> Some of the major companies are Red Hat, SuSE, Caldera, Debian,
> Slackware, Mandrake, Corel,...

Debian is not a company.
-- 
John Hasler
[EMAIL PROTECTED]
Dancing Horse Hill
Elmwood, Wisconsin

------------------------------

From: [EMAIL PROTECTED]
Reply-to: [EMAIL PROTECTED]
Subject: Re: qmail vs sendmail
Date: Wed, 13 Dec 2000 00:24:06 GMT

>>>>> "Rod" == Rod Smith <[EMAIL PROTECTED]> writes:
Rod> In article <[EMAIL PROTECTED]>, ray
Rod> carpenter <[EMAIL PROTECTED]> writes:
>>  I heard some very good things about using qmail instead of
>> sendmail.  For those of you that have run both of these MTA's, what
>> your opinion?  Any insights would be appreciated....

Rod> Without knowing more about your needs and reasons for considering
Rod> a change, it's hard to give a coherent response. In general,
Rod> qmail is easier to configure than is sendmail using its
Rod> sendmail.cf file, but using m4 and the sendmail.mc file helps
Rod> sendmail a lot.

This one seems to me to be a _very_ deceptive issue...

On the one hand, Sendmail has a configuration format that is downright
_frightening_, if taken to extremes.

For instance, in:
<http://pobox.com/~oleg/ftp/packages/sendmail.cf> 
we see:
########################################################################
#                       Sendmail as a Turing machine
#
# Representing TM's tape:
# Cells are separated by a . character (a single dot)
# '@' sign means a blank character.
# % specifies the current position of the head.
# For example,
#       @.I.I.%I
# stands for a tape that starts with a blank and contains three I
# characters. The TM head is over the last 'I' character.
#       ab.cde.%@
# shows a tape with two non-blank symbols. The head is positioned after
# the second one.

# Move the head to the left
Smove_left
R$* @ . %               $@ $1 % @
R$* $- . % @            $@ $1 % $2
R$* $- . % $*           $@ $1 % $2 . $3
R$*                     $#error underflow: $1

# Move the head to the right
Smove_right
R$* % $- . $+           $@ $1 $2 . % $3
R$* % $-                $@ $1 $2 . %@   there is always a blank at the right
R$* %                   $@ $1 @ . %@    edge of the tape
R$*                     $#error no-head: $1

# Tests:
# /usr/sbin/sendmail -C temp/sendmail.cf -bt -v
# where temp/sendmail.cf is assumed to be this file.
# enter at the sendmail's prompt:
# move_left %
# move_left @.%
# move_left a.@.%
# move_left a.b.%@
# move_left a.b.%c
# move_left a.b.%c.@
# move_left a.b.%c.d
# move_right %
# move_right %a
# move_right %b.c
# move_right %b.@
# move_right @.%b.c
# move_right @.%b.c.d
# move_right @.%b
# move_right @.%
# move_left,move_left,move_right,move_right,move_right,move_right,move_right a.b.%c.d 

# Addition function
# @[email protected].%@
Sadd
R$+. %                  $: $1.%@
R$+. %@ $*              $: $>move_left $1.%@$2
R$+. %a $*              $>move_left $1.%a$2     until the first blank
R$+. %@ $*              $: $>move_right $1.%a$2 replace blank with 'a'
R$+. %a $*              $>move_right $1.%a$2    until the first blank
R$+. %@ $*              $: $>move_left $1.%@$2
R$+. %$- $*             $@ $1.%@$3              overwrite $2 with a blank

# Try
# add @[email protected].%@
# add @.a.a.@.%@
# add @[email protected].%@
# add @.@.%@ 
# add [email protected][email protected].%@.other.tokens

# Decision machine
# Decide if the number of tokens on the tape between two delimiting blanks
# is even or odd.
Sevenp
R$* %@ $*               $: $>move_left $1%@$2
R$* %@ $*               $: $>move_right $1%@$2
R$* %@ $*               $@ $>move_right $1 %Yes $2      set the answer, halt
R$* %$- $*              $@ $>oddp $1%@$3        overwrite $2 with a blank

Soddp
R$* %@ $*               $: $>move_left $1%@$2
R$* %@ $*               $: $>move_right $1%@$2
R$* %@ $*               $@ $>move_right $1 %No $2       set the answer, halt
R$* %$- $*              $@ $>evenp $1%@$3       overwrite $2 with a blank

# Try
# evenp @.a.a.a.%@
# oddp @.www.sendmail.org.%@
# evenp @.%@
# oddp  @.%@
# evenp @.prep.ai.mit.edu.%@
# evenp [email protected].%@.other.tokens

This is quite entirely perverse, and qmail's "simpler" approach that
rules out such perverse programmability might be _expected_ to lead to
it being simpler to configure.

On The Other Hand, the "potential scariness" of /etc/sendmail.cf is
mitigated by the fact that just about everybody need only mess with
the two lines with
DS 
  and _maybe_
#Dj$w.Foo.COM

I've _never_ found that I had to spend 4 hours trying to fiddle with
/etc/sendmail.cf, whereas, despite the _apparently_ simpler config
scheme of qmail, the last time I played with it, I spent 4 hours
fighting with it to get it to do what I wanted.

Thus, they have somewhat different priorities:
 - There is some entirely sophisticated prepackaged config for
   Sendmail that you will _never_ need to touch.

   I have no idea what the following does, but don't need to care:
   # handle virtual users
   R$+ < @ $=w . >         $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
   R<@> $+ + $* < @ $* . >
                           $: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 
. >
   R<@> $+ + $* < @ $* . >
                           $: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . >
   R<@> $+ < @ $+ . >      $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
   R<@> $+                 $: $1
   R< error : $- $+ > $*   $#error $@ $(dequote $1 $) $: $2
   R< $+ > $+ < @ $+ >     $: $>97 $1

 - qmail encourages, and I'd argue, _requires_ that the configurer
   have a pretty clear understanding of what it's doing when it
   forwards mail through its different programs.

   It is small enough that someone interested can readily understand
   the whole thing; unfortunately, if it mandates that you understand
   the whole thing, that may make it more daunting than Sendmail.

Rod> qmail is supposed to scale better to very heavy mail loads, but
Rod> I've no personal experience with that. qmail also has a better
Rod> (but shorter) security history -- but sendmail's been pretty
Rod> clean for the past couple of years, so maybe most of the biggies
Rod> have all been found and excised.  IMHO, the biggest drawback to
Rod> qmail if you've already got sendmail is that qmail uses a
Rod> different format for storing user messages, which means you'll
Rod> have to update mail readers and POP or IMAP servers. OTOH, this
Rod> different format has some advantages that can be useful in some
Rod> situations.

I have come to really appreciate the Maildir format; it allows me to
process mail that has arrived while other mail is still being
delivered, which Sendmail's use of /var/spool/mail is Not Terribly
Friendly To.

Rod> If you want a fairly easy swap-in replacement for sendmail,
Rod> Postfix may make a better choice, because it's more compatible in
Rod> usage options, mail spool format, etc.

I'd give my vote to Postfix; I've found it extremely satisfactory:
-> It has similar security characteristics to qmail in terms of
   _preventing_, _by design_ the sorts of security holes that Sendmail
   has had to patch its way around;

-> It is _simpler_ to set up a simple Postfix configuration in
   /etc/postfix/postfix.conf than is the case for qmail, and it
   doesn't have the frightening macro rewriting language of Sendmail.

-> Similar speed/efficiency characteristics to qmail;

-> Postfix offers the _option_ of using the Maildir format so that if
   you want to make that transition now, or later, you can.
-- 
(concatenate 'string "cbbrowne" "@hex.net")
<http://www.ntlug.org/~cbbrowne/mail.html>
Bushydo, the way of the shrub -- BONSAI!

------------------------------

From: Andre-John Mas <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: ISO 9660 Volume Name?
Date: Wed, 13 Dec 2000 00:17:05 GMT

 Hi,

 Is there any way of finding out the volume name of the mounted ISO
 9660 'device', or of any other volume? I would be interested in
 knowing about both 'command-line' and 'api' approaches.

 Andre


--
http://www.bigfoot.com/~ajmas/


Sent via Deja.com
http://www.deja.com/

------------------------------

From: Sinner from the Prairy <[EMAIL PROTECTED]>
Subject: Re: configuring CUPS print server
Date: Tue, 12 Dec 2000 19:35:14 +0000

Bob van der Poel wrote:
> 
> I just upgraded to Mandrake 7.2. All seems to be working okay...but I'm
> having a bit of a problem with CUPS. It installed nicely and works, but
> I can't seem to adjust the margins, etc. The sample testpage had the top
> and right margins cut off. I've tried to adjust the  margins using kups
> as well as just editing the config file (/etc/cups/lpoptions), but
> nothing I do seems to have any effect. I can only assume that I'm
> buggering with the wrong file, or that cups is ignoring the config, or
> that the testpage ignores the config???
 
> Any ideas appreciated.

Have you checked the default page size? MAybe you're doing a letter
printing to an A4-size paper... or something like that.


Salut,
Sinner

-- 
http://www.geocities.com/sinner_prairy
[MaDuiXa PoWeR] http://www.maduixa.net
__________________
                  |\                 Linux User # 89976
=====Sinner==== >=--[]>- a Mach 2.5!!  Running on Mandrake 7.2
__________________|/                     Linux Machine # 38068

------------------------------

From: John in SD <[EMAIL PROTECTED]>
Subject: Re: Lilo: hiding one partition and unhiding other when booting?
Reply-To: [EMAIL PROTECTED]
Date: Wed, 13 Dec 2000 00:36:01 GMT

LILO 21.6 was issued specifically to address this issue, and to update the
previous support for hidden partitions.

   ftp://brun.dyndns.org/pub/linux/lilo + 2 patches

21.6 should do all the hiding/unhiding by default.  I would be interested in
feedback on this operation.

Also /sbin/lilo -T ChRul will display the partition change rules.
/sbin/lilo -T help for more information.

--John




On Tue, 12 Dec 2000 14:05:39 -0500, <[EMAIL PROTECTED]> wrote:

>Hello,
>I am having some difficulty figuring this out.
>
>conf:
>hda1 : ext2           ( Active, with lilo )
>hda2: fat16 nt
>hda3 :fat16 win98
>hda4 : extd
>
>
>I would like lilo o unhide hda2 , and hide hda3 when I boot NT . conversely,
>I would like lilo to hide hd2 and unhide hda3 when I boot win98 . That is, I
>do not want either of them  trying to boot from "C:", for what ever reason.
>
>No, installing win98 into a D: drive ( and having both visible ) is not a
>solution - it will still use the boot block on hda2 .
>
>My previous approach was to make the nt partition ntfs, and win98 fat32.
>That way, win98 thinks hda3 is "C:" (sigh!) .
>
>I have heard that lilo can hide and unhide partition while booting, so I
>took a look in the docs, and got so far as preparing a changes subsection
>for the nt and win98 sections. What comes next ?
>I am not sure how to define the rules for a fat 16 partition.
>Any ideas ?
>
>
>joseph
>
>
>
>
>
>


LILO version 21.6 (04-Oct-2000) source at
http://www.ibiblio.org/pub/Linux/system/boot/lilo
patches at ftp://brun.dyndns.org/pub/linux/lilo

------------------------------

From: "Garry Knight" <[EMAIL PROTECTED]>
Subject: Re: Is Linux/Mandrake good?
Date: Wed, 13 Dec 2000 00:51:37 +0000
Reply-To: [EMAIL PROTECTED]

In article <vNxZ5.211$[EMAIL PROTECTED]> "Richard Kimber"
<[EMAIL PROTECTED]> wrote:

> In Mand 7.2, which I've just upgraded to, cron seems to be set to do a
>  whole load of stuff that's not clear to me.  The problem with this is
> that  when I was downloading a file from the net, it kicked in with a
> massive use  of disk and took over the machine so that the download
> was aborted.  This  is not nice.  I've disabled it all.  I hope.

In the default installation 7.2 runs anacron by default. As long as
your machine is on all the time it behaves pretty much exactly like
cron. However, if the PC's turned off when a cron job is scheduled to
run, anacron runs the job at the next earliest opportunity, i.e.
shortly after you've turned the PC back on.

anacron uses the configuration file /etc/anacrontab so if you've
disabled jobs in /etc/crontab you might find that they run anyway.

The anacrontab file has a different layout to crontab. Do a 'man
anacron' and 'man anacrontab' for details.

-- 
Garry Knight
[EMAIL PROTECTED]

------------------------------

Date: Tue, 12 Dec 2000 20:06:16 -0500
From: Glitch <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.setup,comp.os.linux
Subject: Re: Kernel

well, in my judgement we are up to 2.4, whether its beta or not. It does
EXIST and it is usable on my laptop.

David wrote:
> 
> For those interested kernel-2.2.18 is available from kernel.org
> 
> --
> Confucius say: He who play in root, eventually kill tree.
> Registered with the Linux Counter.  http://counter.li.org
> ID # 123538
> Completed more work units than 98.887% of seti users. +/- 0.01%

------------------------------

From: "nybblex" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.admin,comp.os.linux.help,comp.os.linux.setup,mailing.unix.enlightenment
Subject: Re: help: enlightenment as session manager
Date: Wed, 13 Dec 2000 03:01:54 +0200

So, you use "kill -9 <process>" every time in every reboot/shutdown?? I 'm
not sure if I understood well...
(my english sucks sometimes..)



� <[EMAIL PROTECTED]> ������ ��� ������ ���������: [EMAIL PROTECTED]
> hi
>
> i currently use gnome+enlightenment. until recently, i ran
> 'gnome-session' as my session manager, but due to a conflict with
> another program, i now run enlightenment as my session manager, and i've
> set 'panel' and 'gmc' to load automatically when enlightenment starts
> up.
>
> A problem arises when shutting down enlightenment. Merely logging out of
> enlightenment terminates gmc and panel by breaking the X connection to
> these applications ie. panel and gmc are not shut down properly. I've
> found that killing gmc with SIGTERM works. however, i cant do the same
> with panel since apparently, every applet needs to be shutdown first.
> I've written a script to identify all the currently used applets, but
> when i try to shut them down, a message pops up on the screen asking if
> i want to reload the applet. Hence, i'm unable to successfully shut down
> panel.
>
> Is there any other way of properly shutting down panel? I hate having to
> improperly terminate it everytime i log out of X.
>
> thanks
> ali
>



------------------------------

Date: Tue, 12 Dec 2000 20:10:46 -0500
From: Glitch <[EMAIL PROTECTED]>
Subject: Re: how read from stdin in csh

i believe, but could be wrong, stdin is represented as <STDIN>
so try using that as the variable. I've never tried writing shell
scripts yet so i cant tell you specifics, sorry.

andrew phuong wrote:
> 
> Hi all,
> 
> I'm creating a C-shell script and I am to prompt the user for
> a value.  Reading the value can be done in sh shell, however
> does anyone know of a way of doing this in the C sh.
> 
> I know it can be done in tcsh, but the syntax
> for it does not work in csh.  i.e using "$<".  I'm looking
> for a solution that works in csh
> 
> thanks in advance
> 
> Andrew

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list by posting to comp.os.linux.misc.

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Misc Digest
******************************

Reply via email to