[H-GEN] Fifos.

jason parker s330812 at cello.it.uq.edu.au
Mon Jul 28 00:12:05 EDT 1997


I decided recently that users should be able to see systems stats
when attempting to log in.  [1]  I see that the getty I run lets me
put escape characters in, but I decided to use a fifo instead.  (Much
more interesting, and more versatile.)

Currently, I have init set to run this on boot to multi-user:

#!/bin/sh
while :
do
   echo "" >| /tmp/.issue	# delete temp file.
   uname -a >> /tmp/.issue
   uptime >> /tmp/.issue
   cat /tmp/.issue > /etc/issue
done

where /etc/issue is a fifo.  This doesn't impact performance most of
the time, but I'd prefer to not have the temp-file sitting around in
/tmp if possible, as it may be (ahem) accidentally deleted from time
to time.  [2]

Does anyone have any suggestions on how to improve this?

Jason

[1] : Stats are seen on login, cause do you really want to use a box
      when the load is 15?  I'm not worried about denial of service,
      as just /logging in/ is a denial of service on my box!  ;)

[2] : Spent an hour ferreting around for a bootdisk last night, when
      no logins were spawned, becuase the script catting to the fifo
      was not running as expected.  Result?  Can't log in, as the fifo
      won't close until something is written to it, and I can't log
      in, as I can't write anything to the fifo.

-----
"What is the sound of Perl?  Is it not the sound of a wall that
people have stopped banging their heads against?" -- Larry Wall
ph330812 at student.uq.edu.au  (play) | Nethack player.  Ascended:
 s330812 at cello.it.uq.edu.au (work) | P(2), and V(1).  Next:  H.

----------------------- HUMBUG General List --------------------------------
echo "unsubscribe general" | mail majordomo at humbug.org.au # To Unsubscribe



More information about the General mailing list