Linux-Development-Sys Digest #201, Volume #6      Sat, 2 Jan 99 03:16:22 EST

Contents:
  Re: What about "Linux.. the home game"?? (a consumer version) (Christopher Browne)
  Re: Why I'm dumping Linux, going back to Windblows ("William Coleman")
  Re: Backing up Processes (Richard Jones)
  Re: HELP w/ Yamaha OPL3-Sa Sound (Peter Samuelson)
  Serial communication on linux ("NeNo")
  Re: lp0 on fire in 2.1.131 (Jens Kristian Søgaard)
  Re: serious bug in 2.0.34 (Jens Kristian Søgaard)
  Re: What about "Linux.. the home game"?? (a consumer version) (Martin J. Maney)
  Re: Electric Fence 100x slower in 2.1.130 than 2.0.35? (Stefan Monnier)
  serious bug in 2.0.34 (Moshe Bar)
  Re: EDID/Plug and Play Monitor support or specs (Richard RUDEK)
  Two tough questions (Michele)
  Single floppy Linux ([EMAIL PROTECTED])
  Re: Why I'm dumping Linux, going back to Windblows (Chris Hanson)
  Re: Registry for Linux - Bad idea (John R. Campbell)
  Possible to mount a initrd.img file directly (w/o gunzipping first) ? (Jeremy 
Mathers)
  Re: Two tough questions (Peter Samuelson)
  Re: Programming CDROM (David T. Blake)
  Re: Why I'm dumping Linux, going back to Windblows (Jeremy Crabtree)
  Re: Two tough questions ([EMAIL PROTECTED])
  Re: Two tough questions (Simon Paradis)
  Re: Two tough questions (Juergen Heinzl)
  Re: lp0 on fire in 2.1.131 (Mike Ireton)
  Re: Registry for Linux - Bad idea ("Frederick W. Reimer,Sr")

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

From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: What about "Linux.. the home game"?? (a consumer version)
Reply-To: [EMAIL PROTECTED]
Date: Sat, 02 Jan 1999 07:47:21 GMT

On Mon, 14 Dec 1998 11:52:28 -0800, Jeff Johnson <[EMAIL PROTECTED]> wrote:
>Okay...
>
>    This is still an idea formulating in my head so I am sure that many
>of you will be able shoot holes in this idea. (fire away)
>
>    I was thinking about the whole Linux/OSS versus Winbloze technology
>and the evil empire in Redmond Washington. As it stands now Linux
>threatens WindowsNT workstation and server applications. These are the
>domain of the sys admin, computer technology professional and the real
>saavy end user or hobbyist base. Surely no real estate agent or family
>doctor is going to go to their favorite computer store and buy a new
>system and a shrink wrapped Redhat box and run home to set it all up and
>play on the internet or send emails to family and friends. That is the
>domain of Winbloze 95/98.... or is it?

At this point in time, you are correct.  Linux isn't terribly suitable
at this time for the relatively computer-illiterate SOHO user.  (That
being said, Windoze is only marginally more suitable...)

>    We already have a high-end, stable, performance operating
>system/environment with Linux. Why not strip it down and come up with a
>single-user, GUI only environment version of Linux strictly for the home
>use, non-computer professional. I mean hell, behind the GUI desktop does
>it matter whether its DOS32 or a Linux kernel running the show?

The problem is that this realistically requires deciding on *a GUI,* and
then building up a complete set of applications that are all coded using
that GUI. 

The KDE and GNOME projects are directly trying to build "decent
integrated environments" with the view of trying to make something that
will be usable to "non-computer-professionals."

What they don't do is to try to take out the multi-user and CLI aspects
of Linux.  I am extremely skeptical that this is of substantial value:
- if these things are hidden behind the GUI, they don't have to cause
the unsophisticated users any problems;
- taking them out would require *massive* architectural changes that
amount to needing to redesign something that already works;
- note in a home with several people, this mandates having some sort of
"multi-user" support;
- similarly, while users may not want to play with CLIs, *programs* may
want to do so...

-- 
"Even more amazing was the realization that God has Internet access.  I
wonder if He has a full newsfeed?" (By Matt Welsh)
[EMAIL PROTECTED] <http://www.ntlug.org/~cbbrowne/lsf.html>

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

From: "William Coleman" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: Why I'm dumping Linux, going back to Windblows
Date: Sat, 02 Jan 1999 07:21:46 GMT

William Coleman wrote in message <3674e4ad.0@seralph9>...
>Where can you get a linux installation to put on to floppy for a: booting


Since i don't read newsgroups very frequently can you be kind enough to mail
me rather than just the group
<[EMAIL PROTECTED]>



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

From: Richard Jones <[EMAIL PROTECTED]>
Subject: Re: Backing up Processes
Date: Sat, 02 Jan 1999 07:43:19 GMT

Klaus Niederkrueger <[EMAIL PROTECTED]> wrote:

: Hi,

: I had last week the following problem:
: I wanted to reboot my machine but had a calculation running for 2 weeks.
: It does not matter anymore, but still I was wondering if it would have
: been possible to store the running process to disk, reboot and then
: restart this process again.

Possible in userspace without complicating the
kernel, using a checkpointing library - I have
one, mail me.

Of course you have to remember to write and
compile your program with checkpointing in
mind beforehand :-)

: If it is not possible, I think that a real cool thing would be to make
: the /proc filesystem even more compatible to normal directories by
: allowing e.g. "chown" on the processes, so that you could change the

You could implement the `chown' functionality.
The question is why is it needed? I've been
using Unix a long time and I can't remember
a particular situation where I've wished that
a process running as one user was owned by
another (mostly because Unix processes are
almost all short-lived anyway).

Rich.

-- 
-      Richard Jones. Linux contractor London and SE areas.        -
-    Very boring homepage at: http://www.annexia.demon.co.uk/      -
- You are currently the 1,991,243,100th visitor to this signature. -
-    Original message content Copyright (C) 1998 Richard Jones.    -

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Subject: Re: HELP w/ Yamaha OPL3-Sa Sound
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
Date: Sat, 02 Jan 1999 07:45:59 GMT

[Ralph <[EMAIL PROTECTED]>]
> I have a Yamaha OPL3-Sa sound card that is supposed to be Sound
> Blaster compatible.  When i configure the card under sndconf I've
> tried regular, 16bit, and Pro settings w/ correct IRQ, DMA, and I/O
> settings. My specific card is supposed to be Sound Blaster Pro
> Compatible, which I have never gotten to work at all. NO Sound.

Is this the OPL3-SA1 or OPL3-SAx or what?  In any case try the MSS
emulation.  Sound Blaster emulations generally don't work in Linux.

Recent development kernels have support for OPL3-SAx as well as
OPL3-SA1 directly, though I don't think they do all that much besides
link the relevant MSS stuff in.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: "NeNo" <[EMAIL PROTECTED]>
Subject: Serial communication on linux
Date: Sat, 02 Jan 1999 07:47:26 GMT

does anyone have some sample how to attach device (laser terminal) on serial
port, and send and receive data.

thanks



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

From: [EMAIL PROTECTED] (Jens Kristian Søgaard)
Subject: Re: lp0 on fire in 2.1.131
Date: Sat, 02 Jan 1999 07:47:28 GMT

Harald Arnesen <[EMAIL PROTECTED]> writes:

> I remember getting this error message from Windows (not the exaxt

Or what about:

        "Error: Succes"

Or an empty ( no text ) error messagebox, having only a "Restart"
button -- and nothing else.

-- 
Jens Kristian Søgaard,
[EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Jens Kristian Søgaard)
Subject: Re: serious bug in 2.0.34
Date: Sat, 02 Jan 1999 07:47:11 GMT

Moshe Bar <[EMAIL PROTECTED]> writes:

> I found a serious bug that can prevent you from loging into your linux
> system after re-boot. I can reproduce the bug in this environment:

> Linux 2.0.34 running on P133 with 76MB and SCSI and NE2000 compatible

The kernel version and hardware version aren't really important in
this issue, as it's login ( the program ) you're having problems with.

Do you run RedHat ( a specific version had a few problems with this ) ?

> If I shutdown the Linux server for maintenance with shutdown -r 5  and a
> user tries to log-in during this time, after re-boot Linux will still
> not allow users to login from the network. The console logins still work

Are you by any chance logging in as root from the console?

This could happen, if a stale /etc/nologin is floating around and
blocking access to others than root. Just remove the file to fix the
problem.

If you use RedHat 5.1, install the System V init system upgrade:

ftp://ftp.redhat.com/pub/redhat/updates/5.1/i386/SysVinit-2.74-4.i386.rpm


-- 
Jens Kristian Søgaard,
[EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Martin J. Maney)
Subject: Re: What about "Linux.. the home game"?? (a consumer version)
Date: Sat, 02 Jan 1999 07:47:14 GMT

In comp.os.linux.development.system Jeff Johnson <[EMAIL PROTECTED]> wrote:
>     We already have a high-end, stable, performance operating
> system/environment with Linux. Why not strip it down and come up with a
> single-user, GUI only environment version of Linux strictly for the home
> use, non-computer professional.

I don't know, why don't you do that?

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

From: Stefan Monnier 
<[EMAIL PROTECTED]>
Subject: Re: Electric Fence 100x slower in 2.1.130 than 2.0.35?
Date: Sat, 02 Jan 1999 07:47:19 GMT

>>>>> "Dan" == Dan Kegel <[EMAIL PROTECTED]> writes:
> The difference is probably Electric Fence; if I compile 
> a non-debugging build of the program (without electic fence),
> it finishes in a few minutes, like normal.

If you end up running your program with Electric Fence turned on all the time,
then you're probably better off staying away from C and switch to another
language where such checks are *much* cheaper (because mostly done at compile
time).  Any language apart from C, Pascal, C++ and Fortran should fill the
bill: faster in this context, easier to write, ...
Automatic memory management goes a long way already.


        Stefan

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

From: Moshe Bar <[EMAIL PROTECTED]>
Subject: serious bug in 2.0.34
Date: Sat, 02 Jan 1999 07:47:14 GMT

Hi everybody

I found a serious bug that can prevent you from loging into your linux
system after re-boot. I can reproduce the bug in this environment:

Linux 2.0.34 running on P133 with 76MB and SCSI and NE2000 compatible
card with acting as NIS server and exporting /home to all my users in
the LAN.

Several HP9000 servers and Sul Ultras2 as well as HP700 B132
workstations mount /home and using linux as their NIS server.

If I shutdown the Linux server for maintenance with shutdown -r 5  and a
user tries to log-in during this time, after re-boot Linux will still
not allow users to login from the network. The console logins still work
OK.

Took me a long time to reproduce the bug because usually this Linux
server is up for 3 or 4 months at a time.

Any comments or fixes to this bug welcome.

Moshe Bar


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

From: [EMAIL PROTECTED] (Richard RUDEK)
Subject: Re: EDID/Plug and Play Monitor support or specs
Date: Sat, 02 Jan 1999 07:47:18 GMT

[EMAIL PROTECTED] (Richard RUDEK) wrote:

>"Frank T. Lofaro" <[EMAIL PROTECTED]> wrote:
>
>>Followup-To: comp.os.linux.development.system
>>
>>Anyone know about Plug and Play monitor support or EDID (Extended
>>Display IDentification)?
>>
>>Any support for it in Linux?
>>

[snip]

>
>I haven't read it yet, but try this:
>
>ftp://ftp.vesa.org/pub/PnD/pnd.pdf 

Here's somthing else you may be interested in:

http://freecenter.digiweb.com/computers/johnfremlin7/read-edid.html
  __   __   _______________________________
 //)) //)) | Richard RUDEK. MicroDek.      | Hey, it's Friday night...
//\\ //\\  | Chatswood, Sydney. Australia. | C:\WORK> CD \  
           `-------------------------------'

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

From: Michele <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Two tough questions
Date: Sat, 02 Jan 1999 07:23:29 GMT

Hi there,

I have 2 easy( or at least I hope so) questions for you.

#1: I need to load two drivers and make a program run in batch mode at
boot time,say when everything is up and ready for login command.Where do
I put these instructions or what I have to do?

#2: I need,from a C program,to make Linux reboot when something weird is
happening.WHat call I need to do within the program?

Thanks in advance.

Michele

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

From: [EMAIL PROTECTED]
Crossposted-To: alt.os.linux,comp.os.linux.development.apps,comp.os.linux.setup
Subject: Single floppy Linux
Date: Sat, 02 Jan 1999 07:23:41 GMT



  Mark Tranchant <[EMAIL PROTECTED]> wrote:
> Search for tomsrtbt (Tom's Root and Boot).

http://www.toms.net/rb/

-Tom

============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

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

From: [EMAIL PROTECTED] (Chris Hanson)
Crossposted-To: alt.os.linux,comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: Why I'm dumping Linux, going back to Windblows
Date: Sat, 02 Jan 1999 07:24:01 GMT

In article <[EMAIL PROTECTED]> Erik <[EMAIL PROTECTED]> writes:

   of win9x use.  Why do people not understand that is SHOULD take you some
   time to learn something new, ESPECIALLY Linux.  Would you expect your

I would not expect what I'm trying to learn to not go out of its way
to be hard, too.

The central idea that Apple and Xerox have contributed to
human-computer interaction is *consistency*.  Editing text files to
change your configuration is not in itself consistent.  Using the same
format in all of those text files is.  Unfortunately, no Unix I know
of does that; every file has its own slightly different format.
Knowing how /etc/hosts is laid out doesn't make learning X resources
any easier, and so on.

I think this is at the core of many peoples' gripes with Linux, and to
deny its legitimacy is a big mistake.

(Of course, I don't expect people to listen to me.  I'll be denounced
as a heretic, torched, and then the church will continue as it has...)

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

From: [EMAIL PROTECTED] (John R. Campbell)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Registry for Linux - Bad idea
Reply-To: [EMAIL PROTECTED]
Date: Sat, 02 Jan 1999 07:24:32 GMT

On Tue, 15 Dec 1998 17:04:42 GMT, Alex Yung <[EMAIL PROTECTED]> wrote:
>org.au> <[EMAIL PROTECTED]>
>Organization: University of Chicago
>Distribution: 
>X-Newsreader: TIN [version 1.2 PL2]
>
>Todd Ostermeier ([EMAIL PROTECTED]) wrote:
>: On Tue, 15 Dec 1998, Richard RUDEK wrote:
>: : "Frederick W. Reimer,Sr" <[EMAIL PROTECTED]> wrote:
>: : 
>: : >It's the same effect (as a registry).  The point is that all
>: : >configuration data is stored through the same mechanism, if not in the
>: : >same file/database/registry.  This stifles innovation and creativity. 
>: : 
>: : You mean like not changing the way a program configures itself (if it aint
>: : broke, don fix it) ; having to cut and paste code from another program
>: : which already parses a text configuration file, worrying about stuff that
>: : should be available in a standard library instead of getting on with the
>: : program...
>
>: Then write a library to do this for you (generally abstracted, of course),
>: and distribute it.
>
>Would it be correct to say this idea/library already existed?  The file
>"Xresources" is a good example.  You can think of it as text mode
>version of Registry and more.  You can have everything in one file or one
>file per application.  I don't believe individual developer needs to
>write their own parser.  But he/she can centainly reinvent the wheel if
>he/she inclines to do so.

        The biggest problem with a "registry" is that it is physically
        separate from the files/programs it needs to access;  Therefore,
        it's *MUCH* easier to lose synchronization between the two items.
        I suspect this factor does not help Windoze.

        As for the .Xresources and .Xdefaults files, well, these are
        your OVERRIDES for inbuilt settings.  They do not have that
        close an affinity with your operating system, BTW, as they are
        distinct (unlike the equivalents in Windoze).

        A registry (even AIX's ODM) can be rendered non-current all too
        easily.

        There is a *known* workaround to a registry-  and it is a proven
        technology.  While we whine and moan about the difficulty of
        dealing with it's file's, the MacOS implements all registry-like
        functions within the resource forks of files.

        I'm of the opinion that _this_ data/resource forking of file
        structures will be the "next big thing" for Linux to embrace;
        If we embed registry information into either the executables
        or data files, we can more easily maintain synchronicity.

        Now all we need is a "trick" to allow us to use the data fork
        normally (transparent to the existing API) and still allow a
        means to re-focus a read on a resource fork.  It'd also be
        real nice to allow multiple "resource" forks, too...

-- 
 John R. Campbell           Speaker to Machines                 [EMAIL PROTECTED]
 - As a SysAdmin, yes, I CAN read your e-mail, but I DON'T get that bored!
   Disclaimer:  All opinions expressed are those of John Campbell alone and
                do not reflect the opinions of his employer(s) or lackeys
                thereof.  Anyone who says differently is itching for a fight!


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

Crossposted-To: comp.os.linux.misc
From: [EMAIL PROTECTED] (Jeremy Mathers)
Subject: Possible to mount a initrd.img file directly (w/o gunzipping first) ?
Date: Sat, 02 Jan 1999 07:40:10 GMT

I have an initrd.img file (initial ram disk image).  I want to see
what is in it.  I can do:

        gzip -dc < initrd.img > /tmp/ramdisk.img
        mount -o loop /tmp/ramdisk.img /mnt

and everything is fine.  Is there any way to do it in one step,
without creating the intermediate file?

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

From: [EMAIL PROTECTED] (Peter Samuelson)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Two tough questions
Reply-To: Peter Samuelson <[EMAIL PROTECTED]>
Date: Sat, 02 Jan 1999 07:23:35 GMT

[Michele  <[EMAIL PROTECTED]>]
> I have 2 easy( or at least I hope so) questions for you.

Yup.

> #1: I need to load two drivers and make a program run in batch mode
> at boot time,say when everything is up and ready for login
> command.Where do I put these instructions or what I have to do?

Depends on your version of `init'.  Which probably depends on your
distribution of Linux.  In Debian (which uses sysvinit), for example,
just add the necessary script or a symbolic link to same to /etc/rc2.d/
or whichever runlevel you want this to happen in.  For more info read
up on `init'.

> #2: I need,from a C program,to make Linux reboot when something weird
> is happening.WHat call I need to do within the program?

You could call the reboot syscall directly but the cleanest way to do
this is probably through a watchdog timer.  Configure your kernel with
"softdog" support (in the "character devices" section) and read up on
it.  Basically this is a file in /dev which your program opens and
periodically writes to.  If it closes the file or doesn't write to it
for a certain amount of time, Linux will assume that something has hung
or otherwise gone wrong and will reboot.

-- 
Peter Samuelson
<sampo.creighton.edu!psamuels>

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

From: [EMAIL PROTECTED] (David T. Blake)
Subject: Re: Programming CDROM
Date: Sat, 02 Jan 1999 07:45:50 GMT

[EMAIL PROTECTED] (Peter Samuelson) writes:

>[Gyorgy Krajcsovits <[EMAIL PROTECTED]>]
>> What I did was to write a simple (about 45 lines) Tcl/Tk script that
>> has a button for (mount/umount and eject).
>
>I think what you want is the supermount patch by Stephen Tweedie.  I
>haven't tried it, but the way it's supposed to work is that the kernel
>mounts something removable (floppy/cd/zip/etc) but lets you change
>media out from under it, and automatically does the unmounting and
>remounting when necessary.  Also avoids delayed writes, for obvious
>reasons.  The idea is to make removable media behave as it does under
>MS-DOS.  Find supermount at:
>
>  http://sunsite.unc.edu/pub/Linux/kernel/patches/diskdrives/
>
>IIRC supermount doesn't poll but checks the media when it's actually
>accessed.  (Sort of like automount in this respect.)

Except, that automount will not allow the disk to be ejected
when any process sits in that directory. For example, suppose
you mount the cdrom, cd /mnt/cdrom, and do ls. 

You are sitting in console mode, and you startx.

You cannot eject the cdrom until you quit X and change the
console process out of the /mnt/cdrom directory.

With supermount you can.

It would be super super cool, and well within Stephen Tweedie's
grasp, to add auto-filesystem detection. That way you could 
read an ext2 floppy, and then take it out and throw in a
vfat floppy, with minimal hassle. 


-- 
Dave Blake
[EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Jeremy Crabtree)
Crossposted-To: alt.os.linux,comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: Why I'm dumping Linux, going back to Windblows
Date: 2 Jan 1999 07:25:35 GMT
Reply-To: [EMAIL PROTECTED]

William Coleman allegedly wrote:
>William Coleman wrote in message <3674e4ad.0@seralph9>...
>>Where can you get a linux installation to put on to floppy for a: booting

Tom's Root/Boot:

http://www.toms.net/rb/

>Since i don't read newsgroups very frequently can you be kind enough to mail
>me rather than just the group

Um...no, I don't think I'll email it. It's better to share the answer with
everyone, that way the question might get asked less often.


-- 
"Being myself a remarkably stupid fellow, I have had to unteach myself  the
 difficulties, and now beg to present to my fellow fools the parts that are
 not hard" --Silvanus P. Thompson, from "Calculus Made Easy."

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Two tough questions
Date: Sat, 02 Jan 1999 07:23:44 GMT

Michele <[EMAIL PROTECTED]> wrote:

> #1: I need to load two drivers and make a program run in batch mode at
> boot time,say when everything is up and ready for login command.Where do
> I put these instructions or what I have to do?

One easy place to add such commands is to /etc/rc.d/rc.local.  Another
possibility is to create a start/stop script in /etc/rc.d/init.d that you
link to from the appropriate run-level directories.  This is a bit more
complex, but has the necessary semantics for stopping as well as starting
batch processes, so when your machine is rebooted, your background process
can be cleanly terminated.

> #2: I need,from a C program,to make Linux reboot when something weird is
> happening.WHat call I need to do within the program?

I saw mention recently of a software watchdog timer for Linux.  I can't
remember where I saw it, however.  Perhaps it was in some 2.2 kernel
discussion or a feature page for RH 5.2 (both things I've been looking at
recently).  The idea is that you create a watchdog device and run a program
to write to it periodically.  If the process hangs and fails to write to the
watchdog device for more than a minute, the system reboots, in theory.  In
practice, however, there are probably a number of situations that can arise
where the watchdog code can't get control.

If you have a program that can reliably tell when the system is "weird" *and*
get control, it can call the reboot(2) system call.  I sincerely doubt that a
user-level program can reliably gain control if the system is truly acting
"weird" however.  ("weird" covers a multitude of sins including kernel
deadlocks in SMP mode, for instance...)

You can purchase hardware watchdog timers that reboot your system when they
detect inactivity.  They work like the watchdog device, but are separate from
the OS software, so when they aren't written to they *can* reliably reset the
system using switches on the motherboard.

--
Skip Montanaro
Mojam: http://www.mojam.com/
Musi-Cal: http://concerts.calendar.com/

============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

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

From: Simon Paradis <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Two tough questions
Date: Sat, 02 Jan 1999 07:23:37 GMT

Michele wrote:
> 
> Hi there,
> 
> I have 2 easy( or at least I hope so) questions for you.
> 
> #1: I need to load two drivers and make a program run in batch mode at
> boot time,say when everything is up and ready for login command.Where do
> I put these instructions or what I have to do?
Put your stuff in /etc/rc.d/rc.local (assuming you have Slackware, these
files
are probably different under other distributions)

Commands inside this file get executed last just before the system can
accept
logins. For exemple, in this file, I put a command which outputs the
time and date to /etc/motd. That way each time I login, I know when I
last
rebooted my system.

> #2: I need,from a C program,to make Linux reboot when something weird is
> happening.WHat call I need to do within the program?

system("reboot");

This is not elegant but it might work.


-- 

/-------------------------+-----------------------------------------\
|      Simon Paradis      |Try Net Timer Pro, an internet timer for |
|[EMAIL PROTECTED]|Windows 95/98/NT                         |
|                         |     http://www.microtec.net/~ntpdev     |
\-------------------------+-----------------------------------------/

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Two tough questions
Date: Sat, 02 Jan 1999 07:24:20 GMT

In article <[EMAIL PROTECTED]>, Michele wrote:
>Hi there,
Cheers,
[...]
>#1: I need to load two drivers and make a program run in batch mode at
>boot time,say when everything is up and ready for login command.Where do
>I put these instructions or what I have to do?

in one of your init scripts, but it depends on you init setup whether
you've something like /etc/rc.local (BSD'ish) or a SYSV init compatible
installation (like here, where there are /etc/rc0.d ... /etc/rc6.d 
directories for the different runlevels).

>#2: I need,from a C program,to make Linux reboot when something weird is
>happening.WHat call I need to do within the program?

It depends on how hard you want to bring the machine down, see the source for
sysvinit for more (esp. since it depends on whether you have libc5 or libc6).

Much better of course is to make a clean shutdown and to fork() / exec()
/sbin/shutdown [args] or /sbin/telinit [runlevel] instead of using reboot()
which is a system call. You're talking straight to the kernel here, no
umount, nothing.

You can even set up a special runlevel for a "panic" shutdown (say, you might
disable all logins *right now*, send a message to your pager and such).

Bye,
Juergen

-- 
\ Real name     : Jürgen Heinzl                 \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /
  \ Phone Private : +44 181-332 0750              \                  /

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

From: Mike Ireton <[EMAIL PROTECTED]>
Subject: Re: lp0 on fire in 2.1.131
Reply-To: [EMAIL PROTECTED]
Date: Sat, 02 Jan 1999 07:41:16 GMT

Bjorn Wesen wrote:

> Peter Pointner wrote in message ...
> >Btw, talking about good error messages: I recently wanted to do a screen
> dump
>
> Well how about the Win95 classic:
>
> "Cannot delete file: file already exists."
>
> (maybe a collision in the trashcan ? :)
>
> /Bjorn

How about this, from sendmail 5.65 for a shiver up your spine:

    "Wandering wizards won't win"



--
Mike Ireton
Network Systems Manager
Broadlink Communications




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

From: "Frederick W. Reimer,Sr" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.setup
Subject: Re: Registry for Linux - Bad idea
Date: Sat, 02 Jan 1999 07:25:01 GMT

Richard RUDEK wrote:
> 
> Todd Ostermeier <[EMAIL PROTECTED]> wrote:
> 
> >On Tue, 15 Dec 1998, Richard RUDEK wrote:
> >
> >: "Frederick W. Reimer,Sr" <[EMAIL PROTECTED]> wrote:
> >:
> >: >It's the same effect (as a registry).  The point is that all
> >: >configuration data is stored through the same mechanism, if not in the
> >: >same file/database/registry.  This stifles innovation and creativity.
> >:
> >: You mean like not changing the way a program configures itself (if it aint
> >: broke, don fix it) ; having to cut and paste code from another program
> >: which already parses a text configuration file, worrying about stuff that
> >: should be available in a standard library instead of getting on with the
> >: program...
> >
> >Then write a library to do this for you (generally abstracted, of course),
> >and distribute it.
> 
> Well, to be honest, I'm not writing apps for Linux, so I don't have a need
> to write one for myself (yet), let alone know what the library actually
> needs to have. I'm not a very good C programmer anyway.
> 
> But I think the goal is worth it, and don't mind contributing to it.
> Perhaps the Gnome people would be interested ?
> 
> But I just find it hard to believe that with all these years of unix, a
> standardised configuration/management library (apparently) doesn't exit !?!

Probably because it's so simple to parse a text file.

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


** 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 (and comp.os.linux.development.system) via:

    Internet: [EMAIL PROTECTED]

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-Development-System Digest
******************************

Reply via email to