db-move: moved gvfs from [testing] to [extra] (x86_64)
[arch-packages.git] / mkinitcpio-nfs-utils / trunk / initcpio-install-net
blob79b678949c95363656c02b446e526d05a313f190
1 #!/bin/bash
3 build() {
4 add_checked_modules '/drivers/net/'
5 add_module nfsv3?
7 add_binary "/usr/lib/initcpio/ipconfig" "/bin/ipconfig"
8 add_binary "/usr/lib/initcpio/nfsmount" "/bin/nfsmount"
10 add_runscript
13 help() {
14 cat <<HELPEOF
15 This hook loads the necessary modules for a network device.
16 Detection will take place at runtime. To minimize the modules
17 in the image, add the autodetect hook too.
18 For pcmcia net devices please use pcmcia hook too.
20 Kernel Parameters:
21 An interface spec can be either short form, which is just the name of
22 an interface (eth0 or whatever), or long form. The long form consists
23 of up to seven elements, separated by colons:
25 ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
26 nfsaddrs= is an alias to ip= and can be used too.
28 <client-ip> IP address of the client. If empty, the address will
29 either be determined by RARP/BOOTP/DHCP. What protocol
30 is used de- pends on the <autoconf> parameter. If this
31 parameter is not empty, autoconf will be used.
33 <server-ip> IP address of the NFS server. If RARP is used to
34 determine the client address and this parameter is NOT
35 empty only replies from the specified server are
36 accepted. To use different RARP and NFS server,
37 specify your RARP server here (or leave it blank), and
38 specify your NFS server in the 'nfsroot' parameter
39 (see above). If this entry is blank the address of the
40 server is used which answered the RARP/BOOTP/DHCP
41 request.
43 <gw-ip> IP address of a gateway if the server is on a different
44 subnet. If this entry is empty no gateway is used and the
45 server is assumed to be on the local network, unless a
46 value has been received by BOOTP/DHCP.
48 <netmask> Netmask for local network interface. If this is empty,
49 the netmask is derived from the client IP address assuming
50 classful addressing, unless overridden in BOOTP/DHCP reply.
52 <hostname> Name of the client. If empty, the client IP address is
53 used in ASCII notation, or the value received by
54 BOOTP/DHCP.
56 <device> Name of network device to use. If this is empty, all
57 devices are used for RARP/BOOTP/DHCP requests, and the
58 first one we receive a reply on is configured. If you
59 have only one device, you can safely leave this blank.
61 <autoconf> Method to use for autoconfiguration. If this is either
62 'rarp', 'bootp', or 'dhcp' the specified protocol is
63 used. If the value is 'both', 'all' or empty, all
64 protocols are used. 'off', 'static' or 'none' means
65 no autoconfiguration.
66 Examples:
67 ip=127.0.0.1:::::lo:none --> Enable the loopback interface.
68 ip=192.168.1.1:::::eth2:none --> Enable static eth2 interface.
69 ip=:::::eth0:dhcp --> Enable dhcp protcol for eth0 configuration.
71 nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
73 If the 'nfsroot' parameter is NOT given on the command line, the default
74 "/tftpboot/%s" will be used.
76 <server-ip> Specifies the IP address of the NFS server. If this field
77 is not given, the default address as determined by the
78 'ip' variable (see below) is used. One use of this
79 parameter is for example to allow using different servers
80 for RARP and NFS. Usually you can leave this blank.
82 <root-dir> Name of the directory on the server to mount as root. If
83 there is a "%s" token in the string, the token will be
84 replaced by the ASCII-representation of the client's IP
85 address.
87 <nfs-options> Standard NFS options. All options are separated by commas.
88 If the options field is not given, the following defaults
89 will be used:
90 port = as given by server portmap daemon
91 rsize = 1024
92 wsize = 1024
93 timeo = 7
94 retrans = 3
95 acregmin = 3
96 acregmax = 60
97 acdirmin = 30
98 acdirmax = 60
99 flags = hard, nointr, noposix, cto, ac
101 root=/dev/nfs
103 If you don't use nfsroot= parameter you need to set root=/dev/nfs
104 to boot from a nfs root by autoconfiguration.
105 HELPEOF
108 # vim: set ft=sh ts=4 sw=4 et: