mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-02 08:51:44 +00:00
2a7364476e
The directory holds the Genesis image sources and, beside them, a builder that no pipeline runs. buildrpm, debuild-xcat-genesis-base, install, install.ubuntu, check, cmdlist_check, findmcprpms, xCAT-genesis-builder.spec and the root makerpm-genesisbuilder have no caller. So has build-ubunturepo, which builddebs.pl replaced, and its -r flag has set an unread variable since 2013. docs/source/references/coral/known_issues/genesis_base.rst tells the reader to install an rpm no build produces, and go-xcat offers to remove that package. Delete all of them, and rename the directory xCAT-genesis-base for what it holds: the dracut modules the EL spec and the Ubuntu builder read, the OpenEmbedded layers the GitHub job builds, the deb packaging, the image scripts and 80-net-name-slot.rules. Every reader of the old path is updated: buildrpms.pl, .gitattributes, the OE workflow and the OpenEmbedded tests. buildrpms.pl mapped the package xCAT-genesis-base to the directory xCAT-genesis-builder; the two names are the same now, so the mapping goes. xcat_probe_package_payload.t read build-ubunturepo for the probe helper staging. builddebs.pl stages them with XCAT::BuildUtils::stage_probe_helpers, which build_utils.t drives directly. genesis_base_sources_staged.t passes with this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
61 lines
1.8 KiB
Bash
Executable File
61 lines
1.8 KiB
Bash
Executable File
#!/bin/sh
|
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
|
if [ $reason = "PREINIT" -o $reason = "PREINIT6" ]; then
|
|
ip link set $interface up
|
|
tries=50
|
|
while ! (ip link show $interface|grep LOWER_UP > /dev/null 2>&1); do
|
|
sleep 0.1
|
|
if [ $tries = 0 ]; then
|
|
break
|
|
fi
|
|
tries=$((tries-1))
|
|
done
|
|
elif [ $reason = "BOUND" ]; then
|
|
if [ ! -z "$old_ip_address" ]; then
|
|
ip addr del dev $interface $old_ip_address/$old_subnet_mask
|
|
fi
|
|
for oldip in `ip -o addr show dev $interface|awk '{print $4}'`; do
|
|
ip addr del dev $interface $oldip
|
|
done
|
|
if [ ! -z "$new_ip_address" -a ! -z "$new_subnet_mask" ]; then
|
|
ip addr add dev $interface $new_ip_address/$new_subnet_mask
|
|
fi
|
|
if [ ! -z "$new_host_name" ]; then
|
|
hostname $new_host_name
|
|
lldptool -T -i $interface -V 5 enableTx=yes >& /dev/null
|
|
fi
|
|
if [ ! -z "$new_domain_name" ]; then
|
|
echo search $new_domain_name >> /etc/resolv.conf
|
|
fi
|
|
for ns in $new_domain_name_servers; do
|
|
echo nameserver $ns >> /etc/resolv.conf
|
|
done
|
|
for ntp in $new_ntp_servers; do
|
|
echo server $ntp iburst >> /etc/ntp.conf
|
|
done
|
|
for gw in $new_routers; do
|
|
ip route add default via $gw
|
|
done
|
|
|
|
if [ ! -z "$new_tcode" -a -r "/usr/share/zoneinfo/posix/$new_tcode" ]; then
|
|
cp "/usr/share/zoneinfo/posix/$new_tcode" /etc/localtime
|
|
rm -rf /usr/share/zoneinfo #free up ramdisk
|
|
fi
|
|
elif [ $reason = "BOUND6" ]; then
|
|
if [ ! -z "$old_ip6_address" ]; then
|
|
ip addr del dev $interface $old_ip6_address/$old_ip6_prefixlen
|
|
fi
|
|
if [ ! -z "$new_ip6_address" ]; then
|
|
ip addr add dev $interface $new_ip6_address/$new_ip6_prefixlen
|
|
fi
|
|
elif [ $reason = "RELEASE" ]; then
|
|
if [ ! -z "$old_ip_address" ]; then
|
|
ip addr del dev $interface $old_ip_address/$old_subnet_mask
|
|
fi
|
|
elif [ $reason = "RELEASE6" ]; then
|
|
if [ ! -z "$old_ip6_address" ]; then
|
|
ip addr del dev $interface $old_ip6_address/$old_ip6_prefixlen
|
|
fi
|
|
fi
|
|
exit 0
|