* Created a new RPM (different repo; anvil-striker-extra) for files needed for the Install Target feature but not available in (or reasonably extracted from) RPMs.

* More work on anvil-manage-install-target

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 6 years ago
parent 45f290d5e7
commit b815af03df
  1. 2
      Anvil/Tools.pm
  2. 7
      notes
  3. 2
      rpm/SPECS/anvil.spec
  4. 4
      share/words.xml
  5. 58
      tools/anvil-manage-install-target

@ -920,6 +920,8 @@ sub _set_paths
html => "/var/www/html", html => "/var/www/html",
ifcfg => "/etc/sysconfig/network-scripts", ifcfg => "/etc/sysconfig/network-scripts",
skins => "/var/www/html/skins", skins => "/var/www/html/skins",
syslinux => "/usr/share/syslinux",
tftpboot => "/var/lib/tftpboot",
tools => "/usr/sbin", tools => "/usr/sbin",
units => "/usr/lib/systemd/system", units => "/usr/lib/systemd/system",
}, },

@ -1,3 +1,5 @@
dnf -y install perl-Net-Netmask perl-Text-Diff dnf-utils hdparm lsscsi createrepo dhcp kernel-core syslinux tftp-server
Firewall config stuff. Firewall config stuff.
==== ====
---- Files ---- Files
@ -58,8 +60,6 @@ yes
# NOTE: Doesn't break existing connections # NOTE: Doesn't break existing connections
firewall-cmd --zone=IFN1 --remove-masquerade firewall-cmd --zone=IFN1 --remove-masquerade
- Notes; - Notes;
firewall-cmd --state [running (rc: 0),not running (rc:252)] firewall-cmd --state [running (rc: 0),not running (rc:252)]
@ -77,6 +77,9 @@ Core firewalld configs, including defaults zones, etc - /etc/firewalld/
==== ====
Striker as PXE server Striker as PXE server
==== ====
https://docs.fedoraproject.org/en-US/fedora/f28/install-guide/advanced/Network_based_Installations/ https://docs.fedoraproject.org/en-US/fedora/f28/install-guide/advanced/Network_based_Installations/

@ -69,6 +69,7 @@ Common base libraries required for the Anvil! system.
%package striker %package striker
Summary: Alteeve's Anvil! Striker dashboard package Summary: Alteeve's Anvil! Striker dashboard package
Requires: anvil-core Requires: anvil-core
Requires: anvil-striker-extra
Requires: createrepo Requires: createrepo
Requires: dhcp Requires: dhcp
Requires: firefox Requires: firefox
@ -78,6 +79,7 @@ Requires: nmap
Requires: perl-CGI Requires: perl-CGI
Requires: postgresql-server Requires: postgresql-server
Requires: syslinux Requires: syslinux
Requires: syslinux-nonlinux
Requires: tftp-server Requires: tftp-server
Requires: virt-manager Requires: virt-manager
### Desktop stuff ### Desktop stuff

@ -194,6 +194,10 @@ NOTE: Please be patient!
<key name="message_0097">The file: [#!variable!file!#] was updated.</key> <key name="message_0097">The file: [#!variable!file!#] was updated.</key>
<key name="message_0098">Enabling and starting: [#!variable!daemon!#]</key> <key name="message_0098">Enabling and starting: [#!variable!daemon!#]</key>
<key name="message_0099">The daemon: [#!variable!daemon!#] is already enabled, skipping.</key> <key name="message_0099">The daemon: [#!variable!daemon!#] is already enabled, skipping.</key>
<key name="message_0100">Copying the syslinux files: [#!data!path::directories::syslinux!#/*] into the tftpboot directory: [#!data!path::directories::tftpboot!#].</key>
<key name="message_0101">The syslinux files from: [#!data!path::directories::syslinux!#] appear to already be in the tftpboot directory: [#!data!path::directories::tftpboot!#], skipping.</key>
<key name="message_0102">Checking that the "Install Target" function is configured and updated.</key>
<key name="message_0103"></key>
<!-- Log entries --> <!-- Log entries -->
<key name="log_0001">Starting: [#!variable!program!#].</key> <key name="log_0001">Starting: [#!variable!program!#].</key>

@ -65,11 +65,9 @@ if ($anvil->_short_hostname !~ /striker/)
} }
# load the list of packages; # load the list of packages;
print $anvil->Words->string({key => "message_0102"})."\n";
load_packages($anvil); load_packages($anvil);
# Make sure our repo is installed. If not, install it or fail out.
#check_alteeve_repo($anvil);
# Setup PXE/tftp/dhcpd config. # Setup PXE/tftp/dhcpd config.
setup_boot_environment($anvil); setup_boot_environment($anvil);
@ -88,6 +86,11 @@ sub setup_boot_environment
{ {
my ($anvil) = @_; my ($anvil) = @_;
### TODO: We don't yet support UEFI, though we will need to soon. Note that the 'shim.efi' and
### 'grubx64.efi' files should be added to 'anvil-striker-extras'. We'll also need to create
### '/var/lib/tftpboot/pxelinux/uefi' as well.
### We;re going to need the '.treeinfo' as well in anvil-striker-extra
### - https://docs.fedoraproject.org/en-US/fedora/f28/install-guide/advanced/Network_based_Installations/
# Get my BCN IP and active OS. # Get my BCN IP and active OS.
$anvil->System->get_ips(); $anvil->System->get_ips();
my $bcn_interface = ""; my $bcn_interface = "";
@ -234,6 +237,36 @@ sub setup_boot_environment
update_autoindex_conf => $update_autoindex_conf, update_autoindex_conf => $update_autoindex_conf,
}}); }});
} }
if (($line =~ /^IndexOptions /) && ($line !~ / NameWidth=/))
{
# Allow long file names to show without being truncated
$line .= " NameWidth=*";
$update_autoindex_conf = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
"<< line" => $line,
update_autoindex_conf => $update_autoindex_conf,
}});
}
if (($line =~ /^IndexOptions /) && ($line !~ / FoldersFirst/))
{
# Sort folders before files
$line .= " FoldersFirst";
$update_autoindex_conf = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
"<< line" => $line,
update_autoindex_conf => $update_autoindex_conf,
}});
}
if (($line =~ /^IndexOptions /) && ($line !~ / IgnoreCase/))
{
# Sort filenames without putting capitalized first letters at the start of the list.
$line .= " IgnoreCase";
$update_autoindex_conf = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
"<< line" => $line,
update_autoindex_conf => $update_autoindex_conf,
}});
}
$new_autoindex_conf .= $line."\n"; $new_autoindex_conf .= $line."\n";
} }
if ($update_autoindex_conf) if ($update_autoindex_conf)
@ -260,7 +293,7 @@ sub setup_boot_environment
} }
print $anvil->Words->string({key => "message_0095", variables => { daemon => "httpd", file => $anvil->data->{path}{configs}{'autoindex.conf'} }})."\n"; print $anvil->Words->string({key => "message_0095", variables => { daemon => "httpd", file => $anvil->data->{path}{configs}{'autoindex.conf'} }})."\n";
$anvil->System->reloadt_daemon({daemon => $anvil->data->{sys}{daemon}{httpd}}); $anvil->System->reload_daemon({daemon => $anvil->data->{sys}{daemon}{httpd}});
} }
else else
{ {
@ -354,9 +387,26 @@ sub setup_boot_environment
$anvil->System->start_daemon({daemon => $anvil->data->{sys}{daemon}{httpd}}); $anvil->System->start_daemon({daemon => $anvil->data->{sys}{daemon}{httpd}});
} }
# Make sure the syslinux files needed for creating the PXE boot menu are in place.
if (not -e $anvil->data->{path}{directories}{tftpboot}."/vesamenu.c32")
{
# Copy the syslinux files
print $anvil->Words->string({key => "message_0100"})."\n";
$anvil->Storage->rsync({
debug => 2,
source => $anvil->data->{path}{directories}{syslinux}."/*",
destination => $anvil->data->{path}{directories}{tftpboot}."/",
});
}
else
{
print $anvil->Words->string({key => "message_0101"})."\n";
}
return(0); return(0);
} }
### NOTE: This will probably be removed...
sub check_alteeve_repo sub check_alteeve_repo
{ {
my ($anvil) = @_; my ($anvil) = @_;

Loading…
Cancel
Save