Compare commits
	
		
			4 Commits
		
	
	
		
			326c1dff5c
			...
			2c573fe81b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 2c573fe81b | |||
| 71f0a89dca | |||
| 0ee8a1fdb7 | |||
| 1d0dd0fab7 | 
@@ -122,6 +122,12 @@ cp ../../templates/theme.txt config/includes.chroot/boot/grub/theme.txt || fail
 | 
			
		||||
cp ../../templates/splash.png config/includes.chroot/splash.png || fail "Failed to copy critical template file"
 | 
			
		||||
echo "done."
 | 
			
		||||
 | 
			
		||||
# Install module blacklist template
 | 
			
		||||
echo -n "Copying module blacklist template... "
 | 
			
		||||
mkdir -p config/includes.chroot/etc/modprobe.d
 | 
			
		||||
cp ../../templates/blacklist.conf config/includes.chroot/etc/modprobe.d/blacklist.conf || fail "Failed to copy critical template file"
 | 
			
		||||
echo "done."
 | 
			
		||||
 | 
			
		||||
# Install install.sh script
 | 
			
		||||
echo -n "Copying PVC node installer script template... "
 | 
			
		||||
cp ../../templates/install.sh config/includes.chroot/install.sh || fail "Failed to copy critical template file"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								templates/blacklist.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								templates/blacklist.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
blacklist hpwdt
 | 
			
		||||
@@ -118,9 +118,9 @@ cleanup() {
 | 
			
		||||
    if [[ -z ${DONE} ]]; then
 | 
			
		||||
        case ${install_option} in
 | 
			
		||||
            on)
 | 
			
		||||
                echo "A fatal error occurred; rebooting in 30 seconds. Press any key to spawn a shell."
 | 
			
		||||
                if ! read -t 30; then
 | 
			
		||||
                    reboot
 | 
			
		||||
                echo "A fatal error occurred!; restarting installer in 15 seconds. Press any key to spawn a shell."
 | 
			
		||||
                if ! read -t 15; then
 | 
			
		||||
                    exec ${0}
 | 
			
		||||
                fi
 | 
			
		||||
            ;;
 | 
			
		||||
            *)
 | 
			
		||||
@@ -148,7 +148,7 @@ seed_checkin() (
 | 
			
		||||
    curl -X POST \
 | 
			
		||||
        -H "Content-Type: application/json" \
 | 
			
		||||
        -d "{\"action\":\"${action}\",\"macaddr\":\"${macaddr}\",\"ipaddr\":\"${ipaddr}\",\"hostname\":\"${target_hostname}\",\"bmc_macaddr\":\"${bmc_macaddr}\",\"bmc_ipaddr\":\"${bmc_ipaddr}\"}" \
 | 
			
		||||
        ${pvcbootstrapd_checkin_uri}
 | 
			
		||||
        ${pvcbootstrapd_checkin_uri} >&2
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Obtain the preseed options from the kernel command line
 | 
			
		||||
@@ -172,17 +172,17 @@ done
 | 
			
		||||
 | 
			
		||||
seed_config() {
 | 
			
		||||
    # Get IPMI BMC MAC for checkings
 | 
			
		||||
    bmc_macaddr="$( ipmitool lan print | grep 'MAC Address  ' | awk '{ print $NF }' )"
 | 
			
		||||
    bmc_ipaddr="$( ipmitool lan print | grep 'IP Address  ' | awk '{ print $NF }' )"
 | 
			
		||||
    bmc_macaddr="$( ipmitool lan print 2>/dev/null | grep 'MAC Address  ' | awk '{ print $NF }' )"
 | 
			
		||||
    bmc_ipaddr="$( ipmitool lan print 2>/dev/null | grep 'IP Address  ' | awk '{ print $NF }' )"
 | 
			
		||||
 | 
			
		||||
    # Perform DHCP on all interfaces to come online
 | 
			
		||||
    for interface in $( ip address | grep '^[0-9]' | grep 'eno\|enp\|ens\|wlp' | awk '{ print $2 }' | tr -d ':' ); do
 | 
			
		||||
        ip link set ${interface} up
 | 
			
		||||
        pgrep dhclient || dhclient ${interface}
 | 
			
		||||
        pgrep dhclient &>/dev/null || dhclient ${interface} >&2
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    # Fetch the seed config
 | 
			
		||||
    tftp -m binary "${seed_host}" -c get "${seed_file}" /tmp/install.seed || exit 1
 | 
			
		||||
    tftp -m binary "${seed_host}" -c get "${seed_file}" /tmp/install.seed >&2 || exit 1
 | 
			
		||||
 | 
			
		||||
    # Load the variables from the seed config
 | 
			
		||||
    . /tmp/install.seed || exit 1
 | 
			
		||||
@@ -869,7 +869,6 @@ EOF
 | 
			
		||||
        true
 | 
			
		||||
    ;;
 | 
			
		||||
esac
 | 
			
		||||
echo "done."
 | 
			
		||||
 | 
			
		||||
echo -n "Setting temporary 'root' password... "
 | 
			
		||||
echo "root:${root_password}" | chroot ${target} chpasswd >&2
 | 
			
		||||
@@ -968,6 +967,7 @@ DONE="y"
 | 
			
		||||
seed_postinst() {
 | 
			
		||||
    cleanup
 | 
			
		||||
    echo "Temporary root password: ${root_password}"
 | 
			
		||||
    echo
 | 
			
		||||
    seed_checkin end
 | 
			
		||||
 | 
			
		||||
    echo "Rebooting in 10 seconds."
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user