mirror of
https://pagure.io/fedora-kickstarts.git
synced 2025-12-10 17:10:31 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bfe625d34 | ||
|
|
de56fb5bf2 | ||
|
|
4d772b386c | ||
|
|
ce61f186bb | ||
|
|
5579ccc249 | ||
|
|
d761360668 | ||
|
|
9625f87b66 | ||
|
|
ba05c3ed08 |
@@ -48,6 +48,16 @@ uboot-wandboard_quad
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
|
|
||||||
|
# work around for poor key import UI in PackageKit
|
||||||
|
rm -f /var/lib/rpm/__db*
|
||||||
|
releasever=$(rpm -q --qf '%{version}\n' fedora-release)
|
||||||
|
basearch=armhfp
|
||||||
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||||
|
echo "Packages within this LiveCD"
|
||||||
|
rpm -qa
|
||||||
|
# Note that running rpm recreates the rpm db files which aren't needed or wanted
|
||||||
|
rm -f /var/lib/rpm/__db*
|
||||||
|
|
||||||
# Because memory is scarce resource in most arm systems we are differing from the Fedora
|
# Because memory is scarce resource in most arm systems we are differing from the Fedora
|
||||||
# default of having /tmp on tmpfs.
|
# default of having /tmp on tmpfs.
|
||||||
echo "Disabling tmpfs for /tmp."
|
echo "Disabling tmpfs for /tmp."
|
||||||
|
|||||||
@@ -19,14 +19,12 @@ auth --useshadow --enablemd5
|
|||||||
selinux --enforcing
|
selinux --enforcing
|
||||||
rootpw --lock --iscrypted locked
|
rootpw --lock --iscrypted locked
|
||||||
|
|
||||||
# this is actually not used, but a static firewall
|
firewall --disabled
|
||||||
# matching these rules is generated below.
|
|
||||||
firewall --service=ssh
|
|
||||||
|
|
||||||
bootloader --timeout=1 --append="console=ttyS0,115200n8 console=tty0" extlinux
|
bootloader --timeout=1 --append="console=tty1 console=ttyS0,115200n8" extlinux
|
||||||
|
|
||||||
network --bootproto=dhcp --device=eth0 --onboot=on
|
network --bootproto=dhcp --device=eth0 --onboot=on
|
||||||
services --enabled=network,sshd,rsyslog,iptables,cloud-init,cloud-init-local,cloud-config,cloud-final
|
services --enabled=network,sshd,rsyslog,cloud-init,cloud-init-local,cloud-config,cloud-final
|
||||||
|
|
||||||
|
|
||||||
zerombr
|
zerombr
|
||||||
@@ -63,10 +61,6 @@ syslinux-extlinux
|
|||||||
# Needed initially, but removed below.
|
# Needed initially, but removed below.
|
||||||
firewalld
|
firewalld
|
||||||
|
|
||||||
# Basic firewall. If you're going to rely on your cloud service's
|
|
||||||
# security groups you can remove this.
|
|
||||||
iptables-services
|
|
||||||
|
|
||||||
# cherry-pick a few things from @standard
|
# cherry-pick a few things from @standard
|
||||||
tar
|
tar
|
||||||
rsync
|
rsync
|
||||||
@@ -135,28 +129,6 @@ yum -C -y remove linux-firmware
|
|||||||
echo "Removing firewalld."
|
echo "Removing firewalld."
|
||||||
yum -C -y remove firewalld --setopt="clean_requirements_on_remove=1"
|
yum -C -y remove firewalld --setopt="clean_requirements_on_remove=1"
|
||||||
|
|
||||||
# Non-firewalld-firewall
|
|
||||||
echo -n "Writing static firewall"
|
|
||||||
cat <<EOF > /etc/sysconfig/iptables
|
|
||||||
# Simple static firewall loaded by iptables.service. Replace
|
|
||||||
# this with your own custom rules, run lokkit, or switch to
|
|
||||||
# shorewall or firewalld as your needs dictate.
|
|
||||||
*filter
|
|
||||||
:INPUT ACCEPT [0:0]
|
|
||||||
:FORWARD ACCEPT [0:0]
|
|
||||||
:OUTPUT ACCEPT [0:0]
|
|
||||||
-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
|
||||||
-A INPUT -p icmp -j ACCEPT
|
|
||||||
-A INPUT -i lo -j ACCEPT
|
|
||||||
-A INPUT -m conntrack --ctstate NEW -m tcp -p tcp --dport 22 -j ACCEPT
|
|
||||||
#-A INPUT -m conntrack --ctstate NEW -m tcp -p tcp --dport 80 -j ACCEPT
|
|
||||||
#-A INPUT -m conntrack --ctstate NEW -m tcp -p tcp --dport 443 -j ACCEPT
|
|
||||||
-A INPUT -j REJECT --reject-with icmp-host-prohibited
|
|
||||||
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
|
|
||||||
COMMIT
|
|
||||||
EOF
|
|
||||||
echo .
|
|
||||||
|
|
||||||
# Another one needed at install time but not after that, and it pulls
|
# Another one needed at install time but not after that, and it pulls
|
||||||
# in some unneeded deps (like, newt and slang)
|
# in some unneeded deps (like, newt and slang)
|
||||||
echo "Removing authconfig."
|
echo "Removing authconfig."
|
||||||
@@ -223,8 +195,26 @@ yum history new
|
|||||||
yum clean all
|
yum clean all
|
||||||
truncate -c -s 0 /var/log/yum.log
|
truncate -c -s 0 /var/log/yum.log
|
||||||
|
|
||||||
|
echo "Import RPM GPG key"
|
||||||
|
releasever=$(rpm -q --qf '%{version}\n' fedora-release)
|
||||||
|
basearch=$(uname -i)
|
||||||
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||||
|
|
||||||
|
echo "Packages within this cloud image:"
|
||||||
|
echo "-----------------------------------------------------------------------"
|
||||||
|
rpm -qa
|
||||||
|
echo "-----------------------------------------------------------------------"
|
||||||
|
# Note that running rpm recreates the rpm db files which aren't needed/wanted
|
||||||
|
rm -f /var/lib/rpm/__db*
|
||||||
|
|
||||||
|
|
||||||
echo "Fixing SELinux contexts."
|
echo "Fixing SELinux contexts."
|
||||||
|
touch /var/log/cron
|
||||||
|
touch /var/log/boot.log
|
||||||
|
mkdir -p /var/cache/yum
|
||||||
|
chattr -i /boot/extlinux/ldlinux.sys
|
||||||
/usr/sbin/fixfiles -R -a restore
|
/usr/sbin/fixfiles -R -a restore
|
||||||
|
chattr +i /boot/extlinux/ldlinux.sys
|
||||||
|
|
||||||
echo "Zeroing out empty space."
|
echo "Zeroing out empty space."
|
||||||
# This forces the filesystem to reclaim space from deleted files
|
# This forces the filesystem to reclaim space from deleted files
|
||||||
|
|||||||
@@ -280,6 +280,8 @@ systemctl enable tmp.mount
|
|||||||
|
|
||||||
# work around for poor key import UI in PackageKit
|
# work around for poor key import UI in PackageKit
|
||||||
rm -f /var/lib/rpm/__db*
|
rm -f /var/lib/rpm/__db*
|
||||||
|
releasever=$(rpm -q --qf '%{version}\n' fedora-release)
|
||||||
|
basearch=$(uname -i)
|
||||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
|
||||||
echo "Packages within this LiveCD"
|
echo "Packages within this LiveCD"
|
||||||
rpm -qa
|
rpm -qa
|
||||||
@@ -301,7 +303,7 @@ rm -f /core*
|
|||||||
|
|
||||||
|
|
||||||
%post --nochroot
|
%post --nochroot
|
||||||
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
|
cp $INSTALL_ROOT/usr/share/doc/*-release/GPL $LIVE_ROOT/GPL
|
||||||
|
|
||||||
# only works on x86, x86_64
|
# only works on x86, x86_64
|
||||||
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
|
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user