ALT Linux Bugzilla
– Attachment 2589 Details for
Bug 15466
/ on /dev/nbd* support
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
mkinitrd-3.0.5-nbd.patch
mkinitrd-3.0.5-nbd.patch (text/plain), 3.42 KB, created by
led
on 2008-04-25 18:50:51 MSD
(
hide
)
Description:
mkinitrd-3.0.5-nbd.patch
Filename:
MIME Type:
Creator:
led
Created:
2008-04-25 18:50:51 MSD
Size:
3.42 KB
patch
obsolete
>diff -urN mkinitrd-3.0.5.orig/init mkinitrd-3.0.5/init >--- mkinitrd-3.0.5.orig/init 2007-10-20 16:56:47 +0300 >+++ mkinitrd-3.0.5/init 2008-04-25 17:21:45 +0300 >@@ -60,6 +60,9 @@ > nfsroot=*) > NFSROOT="${x#nfsroot=}" > ;; >+ nbdhost=*) >+ NBDHOST="${x#nbdhost=}" >+ ;; > ip=*) > IPOPTS="${x#ip=}" > ;; >diff -urN mkinitrd-3.0.5.orig/scripts/dhcp mkinitrd-3.0.5/scripts/dhcp >--- mkinitrd-3.0.5.orig/scripts/dhcp 1970-01-01 03:00:00 +0300 >+++ mkinitrd-3.0.5/scripts/dhcp 2008-04-25 17:21:45 +0300 >@@ -0,0 +1,35 @@ >+# parse nbd bootargs + launch ipconfig and nbd-client >+local DEVICE=${DEVICE:-eth0} >+ >+modprobe -q af_packet >+# support ip options see linux sources Documentation/nbd.txt >+case ${IPOPTS} in >+ none|off) >+ # Do nothing >+ ;; >+ ""|on|any) >+ # Bring up device >+ ipconfig ${DEVICE} >+ ;; >+ dhcp|bootp|rarp|both) >+ ipconfig -c ${IPOPTS} -d ${DEVICE} >+ ;; >+ *) >+ ipconfig -d $IPOPTS >+ >+ # grab device entry from ip option >+ NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} >+ if [ "${NEW_DEVICE}" != "${IPOPTS}" ]; then >+ NEW_DEVICE=${NEW_DEVICE%:*} >+ else >+ # wrong parse, possibly only a partial string >+ NEW_DEVICE= >+ fi >+ if [ -n "${NEW_DEVICE}" ]; then >+ DEVICE="${NEW_DEVICE}" >+ fi >+ ;; >+esac >+ >+# source relevant ipconfig output >+. /tmp/net-${DEVICE}.conf >diff -urN mkinitrd-3.0.5.orig/scripts/local-top mkinitrd-3.0.5/scripts/local-top >--- mkinitrd-3.0.5.orig/scripts/local-top 1970-01-01 03:00:00 +0300 >+++ mkinitrd-3.0.5/scripts/local-top 2008-04-25 17:46:10 +0300 >@@ -0,0 +1,6 @@ >+case $ROOT in >+ /dev/nbd*) >+ run_scripts /scripts/dhcp >+ run_scripts /scripts/nbd >+ ;; >+esac >diff -urN mkinitrd-3.0.5.orig/scripts/nbd mkinitrd-3.0.5/scripts/nbd >--- mkinitrd-3.0.5.orig/scripts/nbd 1970-01-01 03:00:00 +0300 >+++ mkinitrd-3.0.5/scripts/nbd 2008-04-25 17:45:48 +0300 >@@ -0,0 +1,22 @@ >+# get nbd root from dhcp >+if [ "x${NBDHOST}" = "xauto" ]; then >+ NBDPORT=${ROOTPATH#*:} >+ NBDHOST=${ROOTPATH%:*} >+# nbdhost=[<server-ip>:][<port>][,<nbd-options>] >+elif [ -n "${NBDHOST}" ]; then >+ # nbd options are an optional arg >+ if [ "${NBDHOST#*,}" != "${NBDHOST}" ]; then >+ NBDOPTS="${NBDHOST#*,}" >+ fi >+ NBDHOST=${NBDHOST%%,*} >+ if [ "${NBDHOST#*:}" = "$NBDHOST" ]; then >+ NBDHOST=${ROOTSERVER} >+ NBDPORT=${NBDHOST} >+ else >+ NBDPORT=${NBDHOST#*:} >+ NBDHOST=${NBDHOST%:*} >+ fi >+fi >+ >+modprobe -q nbd ${NBDDEV_NUM:+nbds_max=$NBDDEV_NUM} && /sbin/udevsettle >+/sbin/nbd-client ${NBDOPTS} ${NBDHOST} ${NBDPORT:-9210} /dev/nbd0 >diff -urN mkinitrd-3.0.5.orig/scripts/nfs mkinitrd-3.0.5/scripts/nfs >--- mkinitrd-3.0.5.orig/scripts/nfs 2007-10-20 16:56:47 +0300 >+++ mkinitrd-3.0.5/scripts/nfs 2008-04-25 17:21:54 +0300 >@@ -8,37 +8,7 @@ > # parse nfs bootargs + launch ipconfig and nfsmount > do_nfsmount() > { >- # support ip options see linux sources Documentation/nfsroot.txt >- case ${IPOPTS} in >- none|off) >- # Do nothing >- ;; >- ""|on|any) >- # Bring up device >- ipconfig ${DEVICE} >- ;; >- dhcp|bootp|rarp|both) >- ipconfig -c ${IPOPTS} -d ${DEVICE} >- ;; >- *) >- ipconfig -d $IPOPTS >- >- # grab device entry from ip option >- NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} >- if [ "${NEW_DEVICE}" != "${IPOPTS}" ]; then >- NEW_DEVICE=${NEW_DEVICE%:*} >- else >- # wrong parse, possibly only a partial string >- NEW_DEVICE= >- fi >- if [ -n "${NEW_DEVICE}" ]; then >- DEVICE="${NEW_DEVICE}" >- fi >- ;; >- esac >- >- # source relevant ipconfig output >- . /tmp/net-${DEVICE}.conf >+ run_scripts /scripts/dhcp > > # get nfs root from dhcp > if [ "x${NFSROOT}" = "xauto" ]; then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15466
: 2589