This will turn off any preemptive swapping and will only allow
swapping to avoid any OOM conditions. This will help to keep
the system responsive, avoids latency and saves writing on
storage.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
name = setup
version = 3.0
-release = 7
+release = 8
arch = noarch
groups = Base Build System/Base
cp -vf %{DIR_APP}/${i} %{BUILDROOT}/etc || exit 1; \
done
- touch %{BUILDROOT}/etc/{environment,fstab}
- chmod -v 0400 %{BUILDROOT}/etc/{,g}shadow
+ touch %{BUILDROOT}%{sysconfdir}/{environment,fstab}
+ chmod -v 0400 %{BUILDROOT}%{sysconfdir}/{,g}shadow
+
+ mkdir -pv %{BUILDROOT}%{sysconfdir}/sysctl.d
+ install -m 644 %{DIR_APP}/sysctl/swappiness.conf \
+ %{BUILDROOT}%{sysconfdir}/sysctl.d/swappiness.conf
end
end
--- /dev/null
+# This will turn off any preemptive swapping and will only allow swapping to
+# avoid any OOM conditions. This will help to keep the system responsive,
+# avoids latency and saves writing on storage.
+
+vm.swappiness = 0