diff --git a/build_debian.sh b/build_debian.sh index c9fc5313c664..aa8c6b04eb70 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -150,8 +150,8 @@ sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/union-mou sudo cp files/initramfs-tools/varlog $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/varlog sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/varlog # Management interface (eth0) dhcp can be optionally turned off (during a migration from another NOS to SONiC) -sudo cp files/initramfs-tools/mgmt-intf-dhcp $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/mgmt-intf-dhcp -sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/mgmt-intf-dhcp +#sudo cp files/initramfs-tools/mgmt-intf-dhcp $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/mgmt-intf-dhcp +#sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/scripts/init-bottom/mgmt-intf-dhcp sudo cp files/initramfs-tools/union-fsck $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck sudo chmod +x $FILESYSTEM_ROOT/etc/initramfs-tools/hooks/union-fsck pushd $FILESYSTEM_ROOT/usr/share/initramfs-tools/scripts/init-bottom && sudo patch -p1 < $OLDPWD/files/initramfs-tools/udev.patch; popd diff --git a/files/initramfs-tools/mgmt-intf-dhcp b/files/initramfs-tools/mgmt-intf-dhcp deleted file mode 100644 index 52f7ff5f495c..000000000000 --- a/files/initramfs-tools/mgmt-intf-dhcp +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -PREREQS="union-mount" - -prereqs() { echo "$PREREQS"; } - -case $1 in - prereqs) - prereqs - exit 0 - ;; -esac - -# Extract kernel parameters -set -- $(cat /proc/cmdline) -for x in "$@"; do - case "$x" in - mgmt-intf-dhcp=*) - val="${x#mgmt-intf-dhcp=}" - - if [ -z "$val" ]; then - echo "ERROR: mgmt-intf-dhcp value (on/off) not specified !" - exit 0 - fi - - if [ -e "${rootmnt}/etc/network/interfaces" ]; then - if [ "$val" = "off" ]; then - sed -i 's/iface eth0 inet dhcp/iface eth0 inet static/g' ${rootmnt}/etc/network/interfaces - elif [ "$val" = "on" ]; then - sed -i 's/iface eth0 inet static/iface eth0 inet dhcp/g' ${rootmnt}/etc/network/interfaces - fi - fi - - ;; - esac -done