From 166a3addd2e26c85e0edc6da4282452f9db0fd29 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Fri, 12 May 2006 05:54:19 +0000 Subject: 'updated net and keymap hooks' git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@97 880c04e9-e011-0410-abf7-b926e227c9cd --- hooks/net | 8 ++++++ install/keymap | 6 ++--- install/net | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 92 insertions(+), 4 deletions(-) create mode 100644 hooks/net diff --git a/hooks/net b/hooks/net new file mode 100644 index 0000000..f3a9de2 --- /dev/null +++ b/hooks/net @@ -0,0 +1,8 @@ +# vim: set ft=sh: +run_hook () +{ + msg -n ":: Loading net..." + ipconfig ${ip} + nfsmount ${nfsroot} /root + msg "done." +} diff --git a/install/keymap b/install/keymap index 7c119e9..767feff 100644 --- a/install/keymap +++ b/install/keymap @@ -19,11 +19,11 @@ install () fi . ${KEYMAP_FILE} add_file ${KEYMAP_FILE} /keymap - [ "$CONSOLEFONT" != "" ] && add_file /usr/share/kbd/consolefonts/$(grep "CONSOLEFONT=" /etc/rc.conf | awk -FCONSOLEFONT= '{print $2}')* - [ "$CONSOLEMAP" != "" ] && add_file /usr/share/kbd/unimaps/$(grep "CONSOLEMAP=" /etc/rc.conf | awk -FCONSOLEMAP= '{print $2}')* + [ "$CONSOLEFONT" != "" ] && add_file /usr/share/kbd/consolefonts/$(grep "CONSOLEFONT=" /etc/rc.conf | awk -FCONSOLEFONT= '{print $2}' | sed -e "s@[\"']*@@g")*.map.gz")* + [ "$CONSOLEMAP" != "" ] && add_file /usr/share/kbd/unimaps/$(grep "CONSOLEMAP=" /etc/rc.conf | awk -FCONSOLEMAP= '{print $2}' | sed -e "s@[\"']*@@g")*.map.gz")* if [ "$KEYMAP" != "" ]; then for i in $(find /usr/share/kbd/ -name "$(grep "KEYMAP=" /etc/rc.conf |\ - awk -FKEYMAP= '{print $2}' | awk -F- '{print $1}')*.map.gz"); do + awk -FKEYMAP= '{print $2}' | awk -F- '{print $1}' | sed -e "s@[\"']*@@g")*.map.gz" )*.map.gz"); do add_file $i done for i in $(echo /usr/share/kbd/keymaps/include/*); do diff --git a/install/net b/install/net index 5411555..89d7ab6 100644 --- a/install/net +++ b/install/net @@ -6,7 +6,7 @@ install () BINARIES="" FILES="" - SCRIPT="" + SCRIPT="net" } help () @@ -16,5 +16,85 @@ cat<:::::: + nfsaddrs= is an alias to ip= and can be used too. + + IP address of the client. If empty, the address will + either be determined by RARP/BOOTP/DHCP. What protocol + is used de- pends on the parameter. If this + parameter is not empty, autoconf will be used. + + IP address of the NFS server. If RARP is used to + determine the client address and this parameter is NOT + empty only replies from the specified server are + accepted. To use different RARP and NFS server, + specify your RARP server here (or leave it blank), and + specify your NFS server in the `nfsroot' parameter + (see above). If this entry is blank the address of the + server is used which answered the RARP/BOOTP/DHCP + request. + + IP address of a gateway if the server is on a different + subnet. If this entry is empty no gateway is used and the + server is assumed to be on the local network, unless a + value has been received by BOOTP/DHCP. + + Netmask for local network interface. If this is empty, + the netmask is derived from the client IP address assuming + classful addressing, unless overridden in BOOTP/DHCP reply. + + Name of the client. If empty, the client IP address is + used in ASCII notation, or the value received by + BOOTP/DHCP. + + Name of network device to use. If this is empty, all + devices are used for RARP/BOOTP/DHCP requests, and the + first one we receive a reply on is configured. If you + have only one device, you can safely leave this blank. + + Method to use for autoconfiguration. If this is either + 'rarp', 'bootp', or 'dhcp' the specified protocol is + used. If the value is 'both', 'all' or empty, all + protocols are used. 'off', 'static' or 'none' means + no autoconfiguration. + Examples: + ip=127.0.0.1:::::lo:none --> Enable the loopback interface. + ip=192.168.1.1:::::eth2:none --> Enable static eth2 interface. + + nfsroot=[:][,] + + If the `nfsroot' parameter is NOT given on the command line, the default + "/tftpboot/%s" will be used. + + Specifies the IP address of the NFS server. If this field + is not given, the default address as determined by the + `ip' variable (see below) is used. One use of this + parameter is for example to allow using different servers + for RARP and NFS. Usually you can leave this blank. + + Name of the directory on the server to mount as root. If + there is a "%s" token in the string, the token will be + replaced by the ASCII-representation of the client's IP + address. + + Standard NFS options. All options are separated by commas. + If the options field is not given, the following defaults + will be used: + port = as given by server portmap daemon + rsize = 1024 + wsize = 1024 + timeo = 7 + retrans = 3 + acregmin = 3 + acregmax = 60 + acdirmin = 30 + acdirmax = 60 + flags = hard, nointr, noposix, cto, ac HELPEOF } -- cgit v1.2.3-24-g4f1b