init 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. .TH INIT 8
  2. .SH NAME
  3. init \- initialize machine upon booting
  4. .SH SYNOPSIS
  5. .B /$cputype/init
  6. [
  7. .B -ctm
  8. ] [
  9. .I command ...
  10. ]
  11. .SH DESCRIPTION
  12. .I Init
  13. initializes the machine: it establishes the name space (see
  14. .IR namespace (4)
  15. and
  16. .I newns
  17. in
  18. .IR auth (2)),
  19. and environment (see
  20. .IR env (3))
  21. and starts a shell
  22. .RI ( rc (1))
  23. on the console.
  24. If a
  25. .I command
  26. is supplied, that is run instead of the shell.
  27. On a CPU server the invoked shell runs
  28. .IR cpurc (8)
  29. before accepting commands on the console;
  30. on a terminal, it runs
  31. .IR termrc
  32. and then the user's profile.
  33. Options
  34. .B -t
  35. (terminal)
  36. and
  37. .B -c
  38. (CPU)
  39. force the behavior to correspond to the specified service class.
  40. Otherwise the default is CPU.
  41. .PP
  42. .I Init
  43. sets environment variables
  44. .B $service
  45. (to
  46. .L terminal
  47. or
  48. .LR cpu ),
  49. .B $objtype
  50. (to the value of
  51. .BR $cputype ),
  52. .B $user
  53. (to the contents of
  54. .BR #c/user ),
  55. and
  56. .B $timezone
  57. (to the contents of
  58. .BR /adm/timezone/local ).
  59. .PP
  60. With option
  61. .B -m
  62. .I init
  63. starts only an interactive shell
  64. regardless of the
  65. .I command
  66. or service class.
  67. .PP
  68. On a CPU server,
  69. .I init
  70. requires the machine's password to be supplied before starting
  71. .I rc
  72. on the console.
  73. .PP
  74. .I Init
  75. is invoked by
  76. .IR boot (8),
  77. which sets the arguments as appropriate.
  78. .SH SOURCE
  79. .B /sys/src/cmd/init.c
  80. .SH "SEE ALSO"
  81. .IR rc (1),
  82. .IR auth (2),
  83. .IR boot (8)