index : mkinitcpio-archiso32 | |
Archlinux32 initcpio scripts used by archiso | gitolite user |
summaryrefslogtreecommitdiff |
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-11-15 22:28:53 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-11-16 16:37:04 -0300 |
commit | a29776e452f846e4e9ffb840d39ee8f729d561d6 (patch) | |
tree | dc3601eb766f485a112cce3738c6ced6300ab3b3 | |
parent | cbfa68ccaba72a22b56fbac6cf8cd9e6e2781888 (diff) |
-rw-r--r-- | archiso/hooks/archiso_pxe_nbd | 50 | ||||
-rw-r--r-- | archiso/install/archiso_pxe_nbd | 2 |
diff --git a/archiso/hooks/archiso_pxe_nbd b/archiso/hooks/archiso_pxe_nbd index cdf4392..be3db28 100644 --- a/archiso/hooks/archiso_pxe_nbd +++ b/archiso/hooks/archiso_pxe_nbd @@ -1,8 +1,12 @@ # vim: set ft=sh: run_hook () { - local line i net_mac bootif_mac bootif_dev address netmask gateway dns0 dns1 rootserver rootpath filename - - : > /ip_opts + local line i net_mac bootif_mac bootif_dev + # These variables will be parsed from /tmp/net-*.conf generated by ipconfig + local DEVICE + local IPV4ADDR IPV4BROADCAST IPV4NETMASK IPV4GATEWAY IPV4DNS0 IPV4DNS1 + local HOSTNAME DNSDOMAIN NISDOMAIN ROOTSERVER ROOTPATH + local filename + # /tmp/net-*.conf if [ -n "${ip}" ]; then if [ -n "${BOOTIF}" ]; then @@ -20,45 +24,11 @@ run_hook () { fi # setup network and save some values - ipconfig "ip=${ip}" | while read line; do - # echo ":: ${line}" - if [ "${line#"IP-Config:"}" != "${line}" ]; then - continue - fi - line="$(echo ${line} | sed -e 's/ :/:/g;s/: /=/g')" - for i in ${line}; do - case "${i}" in - address=*) - echo "${i}" >> /ip_opts - ;; - netmask=*) - echo "${i}" >> /ip_opts - ;; - gateway=*) - echo "${i}" >> /ip_opts - ;; - dns0=*) - echo "${i}" >> /ip_opts - ;; - dns1=*) - echo "${i}" >> /ip_opts - ;; - rootserver=*) - echo "${i}" >> /ip_opts - ;; - rootpath=*) - echo "${i}" >> /ip_opts - ;; - esac - done - done - - . /ip_opts + ipconfig "ip=${ip}" - echo "IP-Config: ${address}/${netmask}" - echo "IP-Config: gw: ${gateway} dns0: ${dns0} dns1: ${dns1}" + . /tmp/net-*.conf - nbdserver=${rootserver} + nbdserver=${ROOTSERVER} [[ -z "${archiso_nbd_name}" ]] && archiso_nbd_name="archiso" diff --git a/archiso/install/archiso_pxe_nbd b/archiso/install/archiso_pxe_nbd index 69a12ce..c26648c 100644 --- a/archiso/install/archiso_pxe_nbd +++ b/archiso/install/archiso_pxe_nbd @@ -12,6 +12,8 @@ build () FILES="" SCRIPT="archiso_pxe_nbd" + add_dir /tmp + add_binary "/usr/sbin/nbd-client" "/bin/nbd-client" add_binary "/lib/initcpio/ipconfig" "/bin/ipconfig" |