home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9561 < prev    next >
Encoding:
Text File  |  1992-08-31  |  2.8 KB  |  74 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!jvnc.net!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!gandalf!michael
  3. From: michael@gandalf.moria (Michael Haardt)
  4. Subject: Re: HOSTNAME usage?
  5. Message-ID: <9208311775@gandalf.moria>
  6. Lines: 59
  7. Sender: news@Urmel.Informatik.RWTH-Aachen.DE (Newsfiles Owner)
  8. Nntp-Posting-Host: messua
  9. Reply-To: u31b3hs@pool.informatik.rwth-aachen.de (Michael Haardt)
  10. Organization: An old and gray machine, somewhere in Moria.
  11. References: <1992Aug28.185449.22092@serval.net.wsu.edu>
  12. Date: Mon, 31 Aug 92 20:48:22 +0100
  13. Lines: 59
  14.  
  15. In article <1992Aug28.185449.22092@serval.net.wsu.edu>, hlu@fili.eecs.wsu.edu (H.J. Lu) writes:
  16. > In article <1425@yetti.UUCP>, frank@cs.yorku.ca (Frank Pikelner) writes:
  17. > |> Since the installation of Linux I have decided to change the name of the machine
  18. > |> from the original. I have tried to use the HOSTNAME program but it only changes
  19. > |> the name temporarily until I reboot. Is there a way to make it permanent? It is
  20. > |> probably something simple that I've overlooked like a file or an option when
  21. > |> running the HOSTNAME program.
  22. >
  23. > Put that line in /etc/rc.local.
  24.  
  25. I wanted to ask that since a while, but now where you bring it up: What rc
  26. files etc. should be used and how?
  27.  
  28. When I used Minix, things were simple.  I had /etc/rc, and that's it.  Now
  29. I have a real init with runlevels.  I read about mount table files which 
  30. specify the disks to mount. (btw: Is that finished?)
  31.  
  32. There is documentation about all these things, you just never get told *how
  33. things usually are installed*, and for various reasons I don't want to look
  34. at the HPs in uni and install it like that :(
  35.  
  36. To make a start, here is my /etc/rc:
  37.  
  38. #!/bin/sh
  39. /bin/rootdev > /etc/mtab
  40. /usr/bin/cat /dev/null > /etc/utmp
  41. /bin/hostname gandalf
  42. /bin/swapon /dev/swap
  43. TERM=con80x25 /usr/bin/setterm -blank 10
  44. /usr/bin/rm -f /etc/nologin
  45.  
  46. That is my /etc/inittab: (using the SYS V init, of course:)
  47.  
  48. # Level to run in
  49. id:5:initdefault::
  50. #dt::sysinit:/usr/bin/date -h
  51. ud::boot:/etc/update
  52. rc::bootwait:/etc/rc
  53. pwr::powerfail:/bin/echo Power failure test ...
  54. # Test entry for ondemand (works!)
  55. od:a:ondemand:/usr/bin/sleep 2
  56. cr::boot:/etc/crond
  57. # Bootlevel 0: test purposes
  58. c0:0:respawn:/bin/getty 9600 tty1
  59. # Normal levels:
  60. c1:123456:respawn:/bin/getty 9600 tty1
  61. c2:23456:respawn:/bin/getty 9600 tty2
  62. c3:3456:respawn:/bin/getty 9600 tty3
  63. c4:456:respawn:/bin/getty 9600 tty4
  64. t1:56:respawn:/bin/getty 19200 ttys3
  65.  
  66. Ok, what about /etc/fastboot, /etc/rc.local and these?  What should be
  67. done in /etc/rc?  Where should filesystems be checked (assuming I would
  68. have more HDs)?  Are there scripts to be executed when changing to
  69. single user more?  What run levels are usually used for what?
  70.  
  71. Perhaps we can come up with something to add to the FAQ or rootdisk.
  72.  
  73. Michael
  74.