1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = Base Build System/Base
12 license = Public Domain
13 summary = A set of system configuration and setup files.
16 The setup package contains a set of important system configuration and
17 setup files, such as passwd, group, and profile.
26 DIR_APP = %{DIR_SOURCE}
33 bash ./shadowconvert.sh
41 # Create missing folders.
42 mkdir -pv %{BUILDROOT}/etc/profile.d %{BUILDROOT}/var/log
44 # Install our config files.
45 for i in aliases bashrc ethertypes exports filesystems group gshadow \
46 host.conf hosts hosts.allow hosts.deny inputrc motd passwd \
47 printcap profile protocols securetty services shadow shells; do \
48 cp -vf %{DIR_APP}/${i} %{BUILDROOT}/etc || exit 1; \
51 # Create envvar overwrite file for bash.
52 echo "#Add any required envvar overrides to this file, \
53 it is sourced from /etc/profile" > %{BUILDROOT}%{sysconfdir}/profile.d/sh.local
55 touch %{BUILDROOT}%{sysconfdir}/fstab
56 chmod -v 0400 %{BUILDROOT}%{sysconfdir}/{,g}shadow
58 # Create empty environment config file.
59 touch %{BUILDROOT}%{sysconfdir}/environment
60 chmod 0644 %{BUILDROOT}%{sysconfdir}/environment
62 # Create MOTD (message of the day) folder layout.
63 mkdir -p %{BUILDROOT}/etc/motd.d
64 mkdir -p %{BUILDROOT}/usr/lib/motd.d
65 touch %{BUILDROOT}/usr/lib/motd
67 # Create a tmpfiles file, needed for files in /run
68 mkdir -p %{BUILDROOT}%{tmpfilesdir}
69 echo "f /run/motd 0644 root root -" > %{BUILDROOT}%{tmpfilesdir}/%{name}.conf
70 echo "d /run/motd.d 0755 root root -" >> %{BUILDROOT}%{tmpfilesdir}/%{name}.conf
71 chmod 0644 %{BUILDROOT}%{tmpfilesdir}/%{name}.conf
73 mkdir -pv %{BUILDROOT}%{sysconfdir}/sysctl.d
74 install -m 644 %{DIR_APP}/sysctl/printk.conf \
75 %{BUILDROOT}%{sysconfdir}/sysctl.d/printk.conf
76 install -m 644 %{DIR_APP}/sysctl/swappiness.conf \
77 %{BUILDROOT}%{sysconfdir}/sysctl.d/swappiness.conf
78 install -m 644 %{DIR_APP}/sysctl/kernel-hardening.conf \
79 %{BUILDROOT}%{sysconfdir}/sysctl.d/kernel-hardening.conf