Update update-iso.sh script with Debian network interface setup example
The functional changes made to update-iso.sh over the transition from CentOS to Debian did not change the example in the tool's help output. This update modifies the network setup example in the update-iso.sh script to reflect the method used in Debian. Test Plan: Create a ks-addon.cfg script and add it to the iso using the update-iso.sh script. PASS: Run the update-iso.sh to add the ks-addon.cfg file PASS: Verify help output content and format PASS: Verify addon execution and interface file setup over USB install PASS: Verify addon execution and interface setup over pxeboot install ... with pxeboot addon support added to the kickstart PASS: Verify network scripts created properly on install PASS: Verify networking automatically setup over post install reboot ... using the example provided in this update Closes-Bug: 2023486 Change-Id: I42d13c1ef0ad12b435c52c1bb312a21f30cf7fcd Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
parent
d98212da96
commit
eefc2de70c
@ -89,30 +89,62 @@ function usage {
|
|||||||
-h Display this help
|
-h Display this help
|
||||||
|
|
||||||
Kickstart Addon Example:
|
Kickstart Addon Example:
|
||||||
What: Define a VLAN on initial OAM interface setup:
|
Create addon file containing the desired kickstart operations.
|
||||||
How : Create and pass a file containing the following
|
Example:
|
||||||
kind of code using the -a <filename> option.
|
Create Debian network interface config files that automatically setup
|
||||||
|
ipv6 oam and management network vlans on a physical interface and
|
||||||
|
add the addon file the ISO image with the '-a <ks-addon.cfg>' option.
|
||||||
|
|
||||||
|
$ ./update-iso.sh -i <iso> -o <updated-iso> -a ks-addon.cfg [other options]
|
||||||
|
|
||||||
#### start ks-addon.cfg
|
#### start ks-addon.cfg
|
||||||
OAM_DEV=enp0s3
|
RAW_DEV=enp24s0f0
|
||||||
OAM_VLAN=1234
|
OAM_VLAN=103
|
||||||
|
MGMT_VLAN=163
|
||||||
|
|
||||||
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-\$OAM_DEV
|
cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/auto
|
||||||
DEVICE=\$OAM_DEV
|
auto ${RAW_DEV} lo vlan${OAM_VLAN} vlan${MGMT_VLAN}
|
||||||
BOOTPROTO=none
|
|
||||||
ONBOOT=yes
|
|
||||||
LINKDELAY=20
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-\$OAM_DEV.\$OAM_VLAN
|
cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-${RAW_DEV}
|
||||||
DEVICE=\$OAM_DEV.\$OAM_VLAN
|
iface ${RAW_DEV} inet manual
|
||||||
BOOTPROTO=dhcp
|
mtu 9000
|
||||||
ONBOOT=yes
|
post-up echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/autoconf;\
|
||||||
VLAN=yes
|
echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/accept_ra;\
|
||||||
LINKDELAY=20
|
echo 0 > /proc/sys/net/ipv6/conf/${RAW_DEV}/accept_redirects
|
||||||
|
pre-up echo 0 > /sys/class/net/${RAW_DEV}/device/sriov_numvfs;\
|
||||||
|
echo 32 > /sys/class/net/${RAW_DEV}/device/sriov_numvfs
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-vlan${OAM_VLAN}
|
||||||
|
iface vlan${OAM_VLAN} inet6 static
|
||||||
|
vlan-raw-device ${RAW_DEV}
|
||||||
|
address <__address__>
|
||||||
|
netmask 64
|
||||||
|
gateway <__address__>
|
||||||
|
mtu 1500
|
||||||
|
post-up /usr/sbin/ip link set dev vlan${OAM_VLAN} mtu 1500;\
|
||||||
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/autoconf;\
|
||||||
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/accept_ra;\
|
||||||
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${OAM_VLAN}/accept_redirects
|
||||||
|
pre-up /sbin/modprobe -q 8021q
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > ${IMAGE_ROOTFS}/etc/network/interfaces.d/ifcfg-vlan${MGMT_VLAN}
|
||||||
|
iface vlan${MGMT_VLAN} inet6 static
|
||||||
|
vlan-raw-device ${RAW_DEV}
|
||||||
|
address <__address__>
|
||||||
|
netmask 64
|
||||||
|
mtu 1500
|
||||||
|
post-up /usr/local/bin/tc_setup.sh vlan${MGMT_VLAN} mgmt 10000 > /dev/null;\
|
||||||
|
/usr/sbin/ip link set dev vlan${MGMT_VLAN} mtu 1500;\
|
||||||
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${MGMT_VLAN}/autoconf;\
|
||||||
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${MGMT_VLAN}/accept_ra;\
|
||||||
|
echo 0 > /proc/sys/net/ipv6/conf/vlan${MGMT_VLAN}/accept_redirects
|
||||||
|
pre-up /sbin/modprobe -q 8021q
|
||||||
|
EOF
|
||||||
|
|
||||||
#### end ks-addon.cfg
|
#### end ks-addon.cfg
|
||||||
|
|
||||||
ENDUSAGE
|
ENDUSAGE
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user