From de16da348671bd797500ab144ae56d23e88c7463 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 30 Mar 2022 17:54:09 +0100 Subject: fixed initd files --- extra/acpid/acpid.confd | 7 + extra/acpid/acpid.initd | 28 ++++ extra/acpid/anything | 3 + extra/acpid/handler.sh | 36 ++++ extra/acpid/lid-closed | 21 +++ extra/acpid/power-supply-ac | 25 +++ extra/dbus/dbus.confd | 7 + extra/dbus/dbus.initd | 33 ++++ extra/dbus/dbus.trigger | 4 + extra/dhcp/01-dhclient-script-fix-bare-ip.patch | 13 ++ .../dhcp/02-dhclient-script-remove-bashisms.patch | 28 ++++ extra/dhcp/03-fix-unwind-import.patch | 16 ++ extra/dhcp/dhcpd.confd | 28 ++++ extra/dhcp/dhcpd.initd | 115 +++++++++++++ .../networkmanager/networkmanager-dispatcher.initd | 12 ++ extra/networkmanager/networkmanager.conf | 2 + extra/networkmanager/networkmanager.initd | 17 ++ extra/networkmanager/networkmanager.rules | 9 + extra/openrc/hostname.initd | 6 +- extra/wpa_supplicant/wpa_cli.confd | 1 + extra/wpa_supplicant/wpa_cli.initd | 22 +++ extra/wpa_supplicant/wpa_supplicant.confd | 10 ++ extra/wpa_supplicant/wpa_supplicant.initd | 79 +++++++++ repo/meta/all.xibuild | 2 +- repo/meta/repo-system.xibuild | 2 +- repo/system/acpid.xibuild | 24 ++- repo/system/dbus.xibuild | 16 +- repo/system/dhcp.xibuild | 86 +++++----- repo/system/networkmanager.xibuild | 32 ++-- repo/util/wpa_supplicant.xibuild | 14 +- repo/xi/sysconfigs.xibuild | 182 ++++++++++----------- 31 files changed, 696 insertions(+), 184 deletions(-) create mode 100644 extra/acpid/acpid.confd create mode 100644 extra/acpid/acpid.initd create mode 100644 extra/acpid/anything create mode 100644 extra/acpid/handler.sh create mode 100644 extra/acpid/lid-closed create mode 100644 extra/acpid/power-supply-ac create mode 100644 extra/dbus/dbus.confd create mode 100644 extra/dbus/dbus.initd create mode 100644 extra/dbus/dbus.trigger create mode 100644 extra/dhcp/01-dhclient-script-fix-bare-ip.patch create mode 100644 extra/dhcp/02-dhclient-script-remove-bashisms.patch create mode 100644 extra/dhcp/03-fix-unwind-import.patch create mode 100644 extra/dhcp/dhcpd.confd create mode 100644 extra/dhcp/dhcpd.initd create mode 100644 extra/networkmanager/networkmanager-dispatcher.initd create mode 100644 extra/networkmanager/networkmanager.conf create mode 100644 extra/networkmanager/networkmanager.initd create mode 100644 extra/networkmanager/networkmanager.rules create mode 100644 extra/wpa_supplicant/wpa_cli.confd create mode 100644 extra/wpa_supplicant/wpa_cli.initd create mode 100644 extra/wpa_supplicant/wpa_supplicant.confd create mode 100644 extra/wpa_supplicant/wpa_supplicant.initd diff --git a/extra/acpid/acpid.confd b/extra/acpid/acpid.confd new file mode 100644 index 0000000..2b3d304 --- /dev/null +++ b/extra/acpid/acpid.confd @@ -0,0 +1,7 @@ +# Configuration file for /etc/init.d/acpid (from acpid package) + +# Additional arguments to pass to acpid. +command_args="--logevents" + +# Uncomment to use process supervisor. +#supervisor="supervise-daemon" diff --git a/extra/acpid/acpid.initd b/extra/acpid/acpid.initd new file mode 100644 index 0000000..c2d60f9 --- /dev/null +++ b/extra/acpid/acpid.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run + +description="The ACPI Daemon" + +extra_started_commands="reload" +description_reload="Reload configuration" + +command="/sbin/acpid" +command_args="--foreground ${command_args:-}" +command_background="yes" +pidfile="/run/$RC_SVCNAME.pid" + +depend() { + need dev localmount + after hwdrivers modules + provide acpid + keyword -vserver -lxc +} + +reload() { + ebegin "Reloading $RC_SVCNAME configuration" + if [ "$supervisor" ]; then + $supervisor "$RC_SVCNAME" --signal HUP + else + start-stop-daemon --pidfile "$pidfile" --signal HUP + fi + eend $? +} diff --git a/extra/acpid/anything b/extra/acpid/anything new file mode 100644 index 0000000..d182898 --- /dev/null +++ b/extra/acpid/anything @@ -0,0 +1,3 @@ +# Pass all events to our one handler script +event=.* +action=/etc/acpi/handler.sh %e diff --git a/extra/acpid/handler.sh b/extra/acpid/handler.sh new file mode 100644 index 0000000..412ac02 --- /dev/null +++ b/extra/acpid/handler.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# vim: set ts=4: +# +# This is the default ACPI handler script that is configured in +# /etc/acpi/events/anything to be called for every ACPI event. +# You can edit it and add your own actions; treat it as a configuration file. +# +PATH="/usr/share/acpid:$PATH" +alias log='logger -t acpid' + +# ::: +case "$1:$2:$3:$4" in + +button/power:PWRF:*) + log 'Power button pressed' + # Shutdown the system unless it has a lid (notebook). + [ -e /proc/acpi/button/lid/LID ] || poweroff +;; +button/sleep:SLPB:*) + log 'Sleep button pressed' + # Suspend to RAM. + zzz +;; +button/lid:*:close:*) + log 'Lid closed' + # Suspend to RAM if AC adapter is not connected. + power-supply-ac || zzz +;; +ac_adapter:*:*:*0) + log 'AC adapter unplugged' + # Suspend to RAM if notebook's lid is closed. + lid-closed && zzz +;; +esac + +exit 0 diff --git a/extra/acpid/lid-closed b/extra/acpid/lid-closed new file mode 100644 index 0000000..57ffb71 --- /dev/null +++ b/extra/acpid/lid-closed @@ -0,0 +1,21 @@ +#!/bin/sh +# This script exits with status 0 if the latop's lid is closed, 1 if opened, +# 10 if /proc/acpi/button/lid/LID/state does not exist or is not readable. +set -u + +STATE_FILE='/proc/acpi/button/lid/LID/state' + +verbose=false +[ "${1:-}" = '-v' ] && verbose=true + +if ! [ -r "$STATE_FILE" ]; then + $verbose && echo "$STATE_FILE does not exist or is not readable!" >&2 + exit 10 +fi + +read -r _ state < "$STATE_FILE" || exit 10 + +[ "$state" = 'closed' ]; rc=$? + +$verbose && echo $rc +exit $rc diff --git a/extra/acpid/power-supply-ac b/extra/acpid/power-supply-ac new file mode 100644 index 0000000..337aae2 --- /dev/null +++ b/extra/acpid/power-supply-ac @@ -0,0 +1,25 @@ +#!/bin/sh +# This script exits with status 0 when the computer is on AC power (or no AC +# power supply found), 1 otherwise (i.e. running on battery). +set -u + +verbose=false +[ "${1:-}" = '-v' ] && verbose=true + +# If we do not have any power supplies, assume we are on AC. +rc=0 + +# Iterate through power supplies sysfs knows about. +for ps in /sys/class/power_supply/*; do + [ -r $ps/online ] || continue + # We know we have an AC adaptor, our default return changes to failed. + rc=1 + + if [ "$(cat $ps/online)" -eq 1 ]; then + rc=0 + break + fi +done + +$verbose && echo $rc +exit $rc diff --git a/extra/dbus/dbus.confd b/extra/dbus/dbus.confd new file mode 100644 index 0000000..0454047 --- /dev/null +++ b/extra/dbus/dbus.confd @@ -0,0 +1,7 @@ +# Configuration for /etc/init.d/dbus + +# Additional arguments to pass to dbus-daemon. +#command_args= + +# Uncomment to use process supervisor. +#supervisor=supervise-daemon diff --git a/extra/dbus/dbus.initd b/extra/dbus/dbus.initd new file mode 100644 index 0000000..f3f44da --- /dev/null +++ b/extra/dbus/dbus.initd @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +name="System Message Bus" +description="D-Bus System Message Bus" + +extra_started_commands="reload" + +command="/usr/bin/dbus-daemon" +command_args="--system --nofork --nopidfile --syslog-only ${command_args:-}" +command_background="yes" +pidfile="/run/$RC_SVCNAME.pid" + +depend() { + need localmount + after bootmisc +} + +start_pre() { + checkpath -d -m755 -o root:messagebus /run/dbus || return 1 + + /usr/bin/dbus-uuidgen --ensure=/etc/machine-id +} + +stop_post() { + [ ! -S /run/dbus/system_bus_socket ] || rm -f /run/dbus/system_bus_socket +} + +reload() { + ebegin "Reloading $name configuration" + /usr/bin/dbus-send --print-reply --system --type=method_call \ + --dest=org.freedesktop.DBus \ + / org.freedesktop.DBus.ReloadConfig > /dev/null + eend $? +} diff --git a/extra/dbus/dbus.trigger b/extra/dbus/dbus.trigger new file mode 100644 index 0000000..a537bd8 --- /dev/null +++ b/extra/dbus/dbus.trigger @@ -0,0 +1,4 @@ +#!/bin/sh + +dbus-send --system --type=method_call --dest=org.freedesktop.DBus / \ + org.freedesktop.DBUS.ReloadConfig >/dev/null 2>&1 || : diff --git a/extra/dhcp/01-dhclient-script-fix-bare-ip.patch b/extra/dhcp/01-dhclient-script-fix-bare-ip.patch new file mode 100644 index 0000000..7b3165d --- /dev/null +++ b/extra/dhcp/01-dhclient-script-fix-bare-ip.patch @@ -0,0 +1,13 @@ +diff --git a/client/scripts/linux b/client/scripts/linux +index 0c42969..3cd2a75 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -394,7 +394,7 @@ case "$reason" in + make_resolv_conf + else + # flush all IPs from interface +- ip -4 addr flush dev ${interface} ++ ${ip} -4 addr flush dev ${interface} + exit_with_hooks 2 + fi + diff --git a/extra/dhcp/02-dhclient-script-remove-bashisms.patch b/extra/dhcp/02-dhclient-script-remove-bashisms.patch new file mode 100644 index 0000000..afa1048 --- /dev/null +++ b/extra/dhcp/02-dhclient-script-remove-bashisms.patch @@ -0,0 +1,28 @@ +diff --git a/client/scripts/linux b/client/scripts/linux +index 0c42969..2e7274b 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # dhclient-script for Linux. Dan Halbert, March, 1997. + # Updated for Linux 2.[12] by Brian J. Murrell, January 1999. + # No guarantees about this. I'm a novice at the details of Linux +@@ -428,7 +428,7 @@ case "$reason" in + # Check if any IPv6 address on this interface is marked as + # tentative. + ${ip} addr show ${interface} | grep inet6 | grep tentative \ +- &> /dev/null ++ > /dev/null 2>&1 + if [ $? -eq 0 ]; then + # Wait for duplicate address detection to complete or for + # the timeout specified as --dad-wait-time. +@@ -437,7 +437,7 @@ case "$reason" in + # We're going to poll for the tentative flag every second. + sleep 1 + ${ip} addr show ${interface} | grep inet6 | grep tentative \ +- &> /dev/null ++ > /dev/null 2>&1 + if [ $? -ne 0 ]; then + break; + fi diff --git a/extra/dhcp/03-fix-unwind-import.patch b/extra/dhcp/03-fix-unwind-import.patch new file mode 100644 index 0000000..8b87fdb --- /dev/null +++ b/extra/dhcp/03-fix-unwind-import.patch @@ -0,0 +1,16 @@ +bind assumes _Unwind_GetIP is a function which is not necessarily +true. In some implementations of libunwind it's a macro. +This fixes the build on Alpine on armhf and armv7. + +--- a/bind/bind-9.11.36/lib/isc/backtrace.c ++++ b/bind/bind-9.11.36/lib/isc/backtrace.c +@@ -81,8 +81,7 @@ isc_backtrace_gettrace(void **addrs, int + return (ISC_R_SUCCESS); + } + #elif defined(BACKTRACE_GCC) +-extern int _Unwind_Backtrace(void* fn, void* a); +-extern void* _Unwind_GetIP(void* ctx); ++#include + + typedef struct { + void **result; diff --git a/extra/dhcp/dhcpd.confd b/extra/dhcp/dhcpd.confd new file mode 100644 index 0000000..5cd2eec --- /dev/null +++ b/extra/dhcp/dhcpd.confd @@ -0,0 +1,28 @@ +# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd + +# If you require more than one instance of dhcpd you can create symbolic +# links to dhcpd service like so +# cd /etc/init.d +# ln -s dhcpd dhcpd.foo +# cd ../conf.d +# cp dhcpd dhcpd.foo +# Now you can edit dhcpd.foo and specify a different configuration file. +# You'll also need to specify a pidfile in that dhcpd.conf file. +# See the pid-file-name option in the dhcpd.conf man page for details. + +# If you wish to run dhcpd in a chroot, uncomment the following line +# DHCPD_CHROOT="/var/lib/dhcp/chroot" + +# All file paths below are relative to the chroot. +# You can specify a different chroot directory but MAKE SURE it's empty. + +# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf +# DHCPD_CONF="/etc/dhcp/dhcpd.conf" + +# Configure which interface or interfaces to for dhcpd to listen on. +# List all interfaces space separated. If this is not specified then +# we listen on all interfaces. +# DHCPD_IFACE="" + +# Insert any other dhcpd options - see the man page for a full list. +# DHCPD_OPTS="" diff --git a/extra/dhcp/dhcpd.initd b/extra/dhcp/dhcpd.initd new file mode 100644 index 0000000..f69ae71 --- /dev/null +++ b/extra/dhcp/dhcpd.initd @@ -0,0 +1,115 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init5,v 1.1 2011/12/04 22:45:07 vapier Exp $ + +extra_commands="configtest" + +: ${DHCPD_CONF:=/etc/dhcp/${SVCNAME}.conf} + +depend() { + need net + after firewall + use logger dns +} + +get_var() { + local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${chroot}${DHCPD_CONF}")" + echo ${var:-$2} +} + +checkconfig() { + set -- ${DHCPD_OPTS} ${chroot:+-chroot} ${chroot} -t + + dhcpd "$@" 1>/dev/null 2>&1 + local ret=$? + if [ ${ret} -ne 0 ] ; then + eerror "${SVCNAME} has detected a syntax error in your configuration files:" + dhcpd "$@" + fi + + return ${ret} +} + +configtest() { + local chroot=${DHCPD_CHROOT%/} + + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +start() { + local chroot=${DHCPD_CHROOT%/} + + # Work out our cffile if it's in our DHCPD_OPTS + case " ${DHCPD_OPTS} " in + *" -cf "*) + DHCPD_CONF=" ${DHCPD_OPTS} " + DHCPD_CONF="${DHCPD_CONF##* -cf }" + DHCPD_CONF="${DHCPD_CONF%% *}" + ;; + *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" + ;; + esac + + if [ -n "${chroot}" ] ; then + # the config test want's these to exist + mkdir -p \ + "${chroot}"/run/dhcp \ + "${chroot}"/var/lib/dhcp \ + "${chroot}"/etc/dhcp + fi + + # see comment in get_var() above + if [ ! -f "${chroot}${DHCPD_CONF}" ] ; then + eerror "${chroot}${DHCPD_CONF} does not exist" + return 1 + fi + + checkconfig || return 1 + + checkpath -d -o dhcp:dhcp "${chroot}"/run/dhcp "${chroot}"/var/lib/dhcp + + local leasefile="$(get_var lease-file-name /var/lib/dhcp/${SVCNAME}.leases)" + checkpath -f -o dhcp:dhcp "${chroot}${leasefile}" + + # Setup LD_PRELOAD so name resolution works in our chroot. + if [ -n "${chroot}" ] ; then + checkpath -d -o root:root -m 755 "${chroot}"/dev "${chroot}"/etc "${chroot}"/proc + cp -pP /etc/localtime /etc/resolv.conf "${chroot}"/etc/ + export LD_PRELOAD="${LD_PRELOAD} libresolv.so libnss_dns.so" + if ! mountinfo -q "${chroot}/proc" ; then + mount --bind /proc "${chroot}/proc" + fi + fi + + local pidfile="$(get_var pid-file-name /run/dhcp/${SVCNAME}.pid)" + + ebegin "Starting ${chroot:+chrooted }${SVCNAME}" + start-stop-daemon --start --exec /usr/sbin/dhcpd \ + --pidfile "${chroot}/${pidfile}" \ + -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \ + -user dhcp -group dhcp \ + ${chroot:+-chroot} ${chroot} ${DHCPD_IFACE} + eend $? \ + && save_options chroot "${chroot}" \ + && save_options pidfile "${pidfile}" +} + +stop() { + local chroot="$(get_options chroot)" + + ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" + start-stop-daemon --stop --exec /usr/sbin/dhcpd \ + --pidfile "${chroot}/$(get_options pidfile)" + res=$? + + if [ ${res} -eq 0 ] && [ -n "${chroot}" ] ; then + if mountinfo -q "${chroot}/proc" ; then + umount "${chroot}/proc" + fi + fi + + eend $res +} diff --git a/extra/networkmanager/networkmanager-dispatcher.initd b/extra/networkmanager/networkmanager-dispatcher.initd new file mode 100644 index 0000000..552cc15 --- /dev/null +++ b/extra/networkmanager/networkmanager-dispatcher.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon +command=/usr/libexec/nm-dispatcher +command_args_foreground="--persist" + +description="Network Manager Dispatcher Daemon" + +depend() { + need dbus + before networkmanager +} diff --git a/extra/networkmanager/networkmanager.conf b/extra/networkmanager/networkmanager.conf new file mode 100644 index 0000000..526d2e4 --- /dev/null +++ b/extra/networkmanager/networkmanager.conf @@ -0,0 +1,2 @@ +[main] +dhcp=internal diff --git a/extra/networkmanager/networkmanager.initd b/extra/networkmanager/networkmanager.initd new file mode 100644 index 0000000..4ca6a0d --- /dev/null +++ b/extra/networkmanager/networkmanager.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright (c) 2008 Saleem Abdulrasool +# Distributed under the terms of the GNU General Purpose License v2 +# $Header: $ + +supervisor=supervise-daemon +command=/usr/sbin/NetworkManager +command_args_foreground="-n" + +description="Network Manager Daemon" + +depend() { + need dbus + provide net +} + +# vim: set ft=gentoo-init-d ts=3 sw=3 et: diff --git a/extra/networkmanager/networkmanager.rules b/extra/networkmanager/networkmanager.rules new file mode 100644 index 0000000..66d21d6 --- /dev/null +++ b/extra/networkmanager/networkmanager.rules @@ -0,0 +1,9 @@ +// Let users in plugdev group modify NetworkManager +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" && + subject.isInGroup("plugdev") && subject.active) { + return "yes"; + } +}); + + diff --git a/extra/openrc/hostname.initd b/extra/openrc/hostname.initd index bd20874..4581595 100644 --- a/extra/openrc/hostname.initd +++ b/extra/openrc/hostname.initd @@ -8,11 +8,11 @@ depend() { start() { if [ -s /etc/hostname ] ; then - opts="-F /etc/hostname" + name=$(cat /etc/hostname) else - opts="${hostname:-localhost}" + name="${hostname:-localhost}" fi ebegin "Setting hostname" - hostname $opts + hostname $name eend $? } diff --git a/extra/wpa_supplicant/wpa_cli.confd b/extra/wpa_supplicant/wpa_cli.confd new file mode 100644 index 0000000..aa481ac --- /dev/null +++ b/extra/wpa_supplicant/wpa_cli.confd @@ -0,0 +1 @@ +WPACLI_OPTS="-a /etc/wpa_supplicant/wpa_cli.sh" diff --git a/extra/wpa_supplicant/wpa_cli.initd b/extra/wpa_supplicant/wpa_cli.initd new file mode 100644 index 0000000..2bf7c0d --- /dev/null +++ b/extra/wpa_supplicant/wpa_cli.initd @@ -0,0 +1,22 @@ +#!/sbin/openrc-run + +supervisor=supervise-daemon + +# The wpa_cli services depends on wpa_supplicant. If wpa_supplicant is +# restarted, so is wpa_cli. Unfortunately, wpa_supplicant creates the +# socket, used for communication with wpa_cli, rather late thereby +# causing wpa_cli to be restarted before it is created and thus fail. +# By default supervise-daemon will restart wpa_cli immediately, often +# resulting in all restart attempts to be exhausted before the socket is +# created. To work around this issue, add a respawn-delay to wpa_cli. +supervise_daemon_args="--respawn-delay 3" + +name="WPA Command Line Client" +description="Text-based frontend for interacting with WPA Supplicant" + +command=/sbin/wpa_cli +command_args="${WPACLI_OPTS} >/dev/null" + +depend() { + need wpa_supplicant +} diff --git a/extra/wpa_supplicant/wpa_supplicant.confd b/extra/wpa_supplicant/wpa_supplicant.confd new file mode 100644 index 0000000..56a6c11 --- /dev/null +++ b/extra/wpa_supplicant/wpa_supplicant.confd @@ -0,0 +1,10 @@ +# conf.d file for wpa_supplicant +# +# Please check man 8 wpa_supplicant for more information about the options +# wpa_supplicant accepts. +wpa_supplicant_args="" + +# The dbus interface will be enabled by default if wpa_supplicant.conf is +# missing. use wpa_supplicant_dbus to explicitly enable/disable dbus interface + +#wpa_supplicant_dbus=no diff --git a/extra/wpa_supplicant/wpa_supplicant.initd b/extra/wpa_supplicant/wpa_supplicant.initd new file mode 100644 index 0000000..c1a4834 --- /dev/null +++ b/extra/wpa_supplicant/wpa_supplicant.initd @@ -0,0 +1,79 @@ +#!/sbin/openrc-run +# Copyright (c) 2009 Roy Marples +# All rights reserved. Released under the 2-clause BSD license. +supervisor=supervise-daemon + +name="WPA Supplicant" +description="Wi-Fi Protected Access client and IEEE 802.1X supplicant" + +command=/sbin/wpa_supplicant +wpa_supplicant_if=${wpa_supplicant_if:+-i}$wpa_supplicant_if +command_args="$wpa_supplicant_args $wpa_supplicant_if" + +default_conf=/etc/wpa_supplicant/wpa_supplicant.conf + +depend() { + need localmount + use logger dbus + after bootmisc modules entropy udev-settle + before dns dhcpcd net + keyword -shutdown +} + +find_wireless() { + local iface= + for iface in /sys/class/net/*; do + if [ -e "$iface"/wireless -o -e "$iface"/phy80211 ]; then + echo "${iface##*/}" + return 0 + fi + done + + return 1 +} + +append_wireless() { + local iface= i= + + iface=$(find_wireless) + if [ -n "$iface" ]; then + for i in $iface; do + command_args="$command_args -i$i" + done + else + eerror "Could not find a wireless interface" + fi +} + +start_pre() { + case " $command_args" in + *" -i"*) ;; + *) append_wireless;; + esac + + # set default conf if dbus is explicitly disabled + if [ -n "${wpa_supplicant_dbus}" ] && ! yesno "${wpa_supplicant_dbus}"; then + : ${wpa_supplicant_conf:=${default_conf}} + fi + + # use default conf if it exists + if [ -f "${default_conf}" ]; then + : ${wpa_supplicant_conf:=${default_conf}} + fi + + # enable default dbus if we still dont have a config + if [ -z "${wpa_supplicant_conf}" ]; then + : ${wpa_supplicant_dbus:=yes} + else + command_args="${command_args} -c$wpa_supplicant_conf" + fi + case " ${command_args}" in + *" -u"*);; + *) if yesno "{wpa_supplicant_dbus}"; then + command_args="-u ${command_args}" + fi + ;; + esac + + checkpath -d -m 0755 -o root:root /var/run/wpa_supplicant +} diff --git a/repo/meta/all.xibuild b/repo/meta/all.xibuild index 53452e7..286a254 100644 --- a/repo/meta/all.xibuild +++ b/repo/meta/all.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="AlL tHe pacKageS!!" -DEPS=" feh lynx rxvt-unicode vim xterm asciidoc autoconf2-13 autoconf-archive autoconf automake bc bison check clang cmake-extra cmake-modules cmake dejagnu distcc docbook4-xml docbook-dtd docbook-xml docbook-xsl expect flex gcc gdb git go gtk-doc help2man icecream itstool llvm m4 make meson mpc nasm ninja patch pkg-config rustc scdoc sgml-common swig texinfo xmlto encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 fontconfig font-ibm-type1 font-misc-ethiopic font-util font-xfree86-type1 linux-firmware linux-headers linux alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils audiofile faac faad2 fdk-aac flac libogg libsamplerate libsndfile libtheora libvorbis libvpx opus pipewire pulseaudio python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-html5lib python-idna python-imagesize python-Jinja2 python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-sphinx python-urllib3 python-webencodings python alsa-oss audit cacert-utils fakechroot fakeroot icecream-sundae polybar xf86-video-qxl xf86-video-vga acl acpid argp-standalone attr binutils bootscripts brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip hwids iana-etc icu imlib2 intltool js78 jsoncpp kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libedit libelf libffi libgcrypt libgpg-error libgudev libidn libldap liblinear libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libuv libxcrypt libxml2 libxslt lua lz4 lzo mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openrc openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump sbase sed shadow sh skalibs slang sqlite3 sysklogd syslinux tar tcl tomlc99 ubase udev-rules utmps xxhash xz zip zlib zstd acpi base64 bash cpio curl dash diffutils dosfstools dracut e2fsprogs file fzf gawk genfstab grep groff htop ifupdown-ng inetutils iproute2 iw keyutils less lm-sensors man-db neofetch net-tools nmap openssh pciutils pm-utils procps-ng rhash rsync sudo unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant bspwm iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau-va-gl libvdpau libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxinerama libxi libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxtst libxt libxvmc libxv libxxf86dga libxxf86vm luit mesa mkfontscale pixman sessreg setxkbmap smproxy sxhkd wayland-protocols wayland x11perf xauth xbacklight xbitmaps xcb-proto xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util xclock xcmsdb xcursorgen xcursor-themes xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorgproto xorg-server xorg-util-macros xorg-xinit xprop xpr xrandr xrdb xrefresh xsetroot xset xtrans xvinfo xwd xwininfo xwud mkinitramfs sysconfigs xib xichroot xipkg xiutils" +DEPS=" feh lynx rxvt-unicode vim xterm asciidoc autoconf2-13 autoconf-archive autoconf automake bc bison check clang cmake-extra cmake-modules cmake dejagnu distcc docbook4-xml docbook-dtd docbook-xml docbook-xsl expect flex gcc gdb git go gtk-doc help2man icecream itstool llvm m4 make meson mpc nasm ninja patch pkg-config rustc scdoc sgml-common swig texinfo xmlto encodings font-adobe-utopia-type1 font-alias font-bh-ttf font-bh-type1 fontconfig font-ibm-type1 font-misc-ethiopic font-util font-xfree86-type1 linux-firmware linux-headers linux alsa-firmware alsa-lib alsa-plugins alsa-tools alsa-utils audiofile faac faad2 fdk-aac flac libogg libsamplerate libsndfile libtheora libvorbis libvpx opus pipewire pulseaudio python-alabaster python-appdirs python-babel python-certifi python-chardet python-docutils python-html5lib python-idna python-imagesize python-Jinja2 python-jinja python-lxml python-mach python-mako python-markupsafe python-packaging python-pip python-pygments python-pyparsing python-pytz python-requests python-six python-snowballstemmer python-sphinx-alabaster-theme python-sphinxcontrib-applehelp python-sphinxcontrib-devhelp python-sphinxcontrib-htmlhelp python-sphinxcontrib-jsmath python-sphinxcontrib-qthelp python-sphinxcontrib-serializinghtml python-sphinx python-urllib3 python-webencodings python alsa-oss audit cacert-utils fakechroot fakeroot icecream-sundae polybar xf86-video-qxl xf86-video-vga acl acpid argp-standalone attr binutils brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip hwids iana-etc icu imlib2 intltool js78 jsoncpp kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libedit libelf libffi libgcrypt libgpg-error libgudev libidn libldap liblinear libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libuv libxcrypt libxml2 libxslt lua lz4 lzo mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openrc openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump sbase sed shadow sh skalibs slang sqlite3 sysklogd syslinux tar tcl tomlc99 ubase udev-rules utmps xxhash xz zip zlib zstd acpi base64 bash cpio curl dash diffutils dosfstools dracut e2fsprogs file fzf gawk genfstab grep groff htop ifupdown-ng inetutils iproute2 iw keyutils less lm-sensors man-db neofetch net-tools nmap openssh pciutils pm-utils procps-ng rhash rsync sudo unzip usbutils util-linux webfs wget which wireless-tools wpa_supplicant bspwm iceauth intel-vaapi-driver libdmx libdrm libepoxy libevdev libfontenc libfs libice libinput libpciaccess libsm libva libvdpau-va-gl libvdpau libwacom libx11 libxau libxaw libxcb libxcomposite libxcursor libxcvt libxdamage libxdmcp libxext libxfixes libxfont2 libxft libxinerama libxi libxkbfile libxmu libxpm libxrandr libxrender libxres libxscrnsaver libxshmfence libxtst libxt libxvmc libxv libxxf86dga libxxf86vm luit mesa mkfontscale pixman sessreg setxkbmap smproxy sxhkd wayland-protocols wayland x11perf xauth xbacklight xbitmaps xcb-proto xcb-util-cursor xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xcb-util xclock xcmsdb xcursorgen xcursor-themes xdpyinfo xdriinfo xev xeyes xf86-input-evdev xf86-input-libinput xf86-input-synaptics xf86-input-wacom xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-intel xf86-video-nouveau xf86-video-vmware xgamma xhost xinput xkbcomp xkbevd xkbutils xkeyboardconfig xkill xlsatoms xlsclients xmessage xmodmap xorg-libs xorgproto xorg-server xorg-util-macros xorg-xinit xprop xpr xrandr xrdb xrefresh xsetroot xset xtrans xvinfo xwd xwininfo xwud mkinitramfs sysconfigs xib xichroot xipkg xiutils" diff --git a/repo/meta/repo-system.xibuild b/repo/meta/repo-system.xibuild index 752f623..37ef7ae 100644 --- a/repo/meta/repo-system.xibuild +++ b/repo/meta/repo-system.xibuild @@ -2,4 +2,4 @@ # This file was automatically generated, do not edit! DESC="All the the packages available in system" -DEPS=" acl acpid argp-standalone attr binutils bootscripts brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip hwids iana-etc icu imlib2 intltool js78 jsoncpp kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libedit libelf libffi libgcrypt libgpg-error libgudev libidn libldap liblinear libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libuv libxcrypt libxml2 libxslt lua lz4 lzo mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openrc openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump sbase sed shadow sh skalibs slang sqlite3 sysklogd syslinux tar tcl tomlc99 ubase udev-rules utmps xxhash xz zip zlib zstd" +DEPS=" acl acpid argp-standalone attr binutils brotli bzip2 cacerts dbus dhcp efibootmgr efivar elfutils elogind eudev execline expat findutils freetype2 gc gdbm gettext glib gmp gnutls gobject-introspection gperf grub guile gzip hwids iana-etc icu imlib2 intltool js78 jsoncpp kbd kmod krb5 ldns libarchive libcap-ng libcap libdwarf libedit libelf libffi libgcrypt libgpg-error libgudev libidn libldap liblinear libndp libnghttp libnl libnsl libp11-kit libpcap libpipeline libpng libpsl libptytty libsasl libseccomp libsigsegv libssh2 libtasn1 libtirpc libtool libunistring libusb libuv libxcrypt libxml2 libxslt lua lz4 lzo mpfr mtdev musl-fts musl-legacy-compat musl-obstack musl ncurses nettle networkmanager newt nspr nsss nss openrc openssl pahole pam pcre2 pcre perl perl-xml-parser polkit popt psmisc queue-standalone readline rtmpdump sbase sed shadow sh skalibs slang sqlite3 sysklogd syslinux tar tcl tomlc99 ubase udev-rules utmps xxhash xz zip zlib zstd" diff --git a/repo/system/acpid.xibuild b/repo/system/acpid.xibuild index 55a4e6f..f960ac0 100644 --- a/repo/system/acpid.xibuild +++ b/repo/system/acpid.xibuild @@ -7,11 +7,14 @@ PKG_VER=2.0.33 SOURCE=https://downloads.sourceforge.net/acpid2/acpid-$PKG_VER.tar.xz DESC="Daemon for battery, power, and thermal readings" -BOOTSCRIPTS=blfs-bootscripts-20210826 ADDITIONAL=" - https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz - " - + acpid.confd + acpid.initd + anything + handler.sh + lid-closed + power-supply-ac +" build () { ./configure --prefix=/usr \ --docdir=/usr/share/doc/acpid-$PKG_VER && @@ -20,10 +23,15 @@ build () { package () { make DESTDIR=$PKG_DEST install - install -v -m755 -d $PKG_DEST/etc/acpi/events && + install -m755 -d $PKG_DEST/etc/acpi/events && cp -r samples $PKG_DEST/usr/share/doc/acpid-$PKG_VER - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-acpid + install -D -m 755 handler.sh etc/acpi/handler.sh + install -D -m 644 anything etc/acpi/events/anything + install -D -m 755 power-supply-ac usr/share/acpid/ + install -D -m 755 lid-closed usr/share/acpid/ + + install -D -m 755 acpid.initd etc/init.d/acpid + install -D -m 644 acpid.confd etc/conf.d/acpid + } diff --git a/repo/system/dbus.xibuild b/repo/system/dbus.xibuild index e1a0e72..795d2d7 100644 --- a/repo/system/dbus.xibuild +++ b/repo/system/dbus.xibuild @@ -5,10 +5,12 @@ DEPS="elogind" PKG_VER=1.12.20 SOURCE=https://dbus.freedesktop.org/releases/dbus/dbus-$PKG_VER.tar.gz -BOOTSCRIPTS=blfs-bootscripts-20210826 + ADDITIONAL=" - https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz - " +dbus.confd +dbus.initd +dbus.trigger +" DESC="A message bus system allowing applications to talk to one another" @@ -25,7 +27,8 @@ build () { --docdir=/usr/share/doc/dbus-$PKG_VER \ --with-console-auth-dir=/run/console \ --with-system-pid-file=/run/dbus/pid \ - --with-system-socket=/run/dbus/system_bus_socket && + --with-system-socket=/run/dbus/system_bus_socket \ + --with-x && make } @@ -47,7 +50,6 @@ package () { EOF - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-dbus + install -Dm755 dbus.initd $PKG_DEST/etc/init.d/dbus + install -Dm644 dbus.confd $PKG_DEST/etc/conf.d/dbus } diff --git a/repo/system/dhcp.xibuild b/repo/system/dhcp.xibuild index b8f5d9d..241dee1 100644 --- a/repo/system/dhcp.xibuild +++ b/repo/system/dhcp.xibuild @@ -6,14 +6,19 @@ DEPS="musl libldap" PKG_VER=4.4.3b1 SOURCE=https://ftp.isc.org/isc/dhcp/$PKG_VER/dhcp-$PKG_VER.tar.gz -BOOTSCRIPTS=blfs-bootscripts-20210826 ADDITIONAL=" - https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz - " +01-dhclient-script-fix-bare-ip.patch +02-dhclient-script-remove-bashisms.patch +03-fix-unwind-import.patch +dhcpd.confd +dhcpd.initd +" DESC="A DHCP server, client and relay" package () { + apply_patches + sed -i '/o.*dhcp_type/d' server/mdb.c && sed -r '/u.*(local|remote)_port/d' \ -i client/dhclient.c \ @@ -22,52 +27,43 @@ package () { build () { - ( export CFLAGS="${CFLAGS:--g -O2} -Wall -fno-strict-aliasing \ - -D_PATH_DHCLIENT_SCRIPT='\"/usr/sbin/dhclient-script\"' \ - -D_PATH_DHCPD_CONF='\"/etc/dhcp/dhcpd.conf\"' \ - -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'" && - -./configure --prefix=/usr \ - --sysconfdir=/etc/dhcp \ - --localstatedir=/var \ - --with-srv-lease-file=/var/lib/dhcpd/dhcpd.leases \ - --with-srv6-lease-file=/var/lib/dhcpd/dhcpd6.leases \ - --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \ - --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases -) && -make -j1 + # fix ipv6 + + export CFLAGS="$CFLAGS -D_GNU_SOURCE \ + -D_PATH_DHCLIENT_CONF='\"/etc/dhcp/dhclient.conf\"'" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/dhcp \ + --localstatedir=/var \ + --with-srv-conf-file=/etc/dhcp/dhcpd.conf \ + --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ + --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ + --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ + --with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \ + --with-srv-pid-file=/run/dhcp/dhcpd.pid \ + --with-srv6-pid-file=/run/dhcp/dhcpd6.pid \ + --with-cli-pid-file=/run/dhcp/dhclient.pid \ + --with-cli6-pid-file=/run/dhcp/dhclient6.pid \ + --with-relay-pid-file=/run/dhcp/dhcrelay.pid \ + --with-relay6-pid-file=/run/dhcp/dhcrelay6.pid \ + --with-libbind=no \ + --enable-dhcpv4o6 \ + --enable-paranoia \ + --enable-log-pid \ + + make -j1 -C bind && make } package () { - make -C client DESTDIR=$PKG_DEST install && - install -m755 client/scripts/linux $PKG_DEST/usr/sbin/dhclient-script - - install -dm755 /etc/dhcp && - cat > $PKG_DEST/etc/dhcp/dhclient.conf << "EOF" -# Begin /etc/dhcp/dhclient.conf -# -# Basic dhclient.conf(5) - -#prepend domain-name-servers 127.0.0.1; -request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, domain-search, host-name, - netbios-name-servers, netbios-scope, interface-mtu, - ntp-servers; -require subnet-mask, domain-name-servers; -#timeout 60; -#retry 60; -#reboot 10; -#select-timeout 5; -#initial-interval 2; - -# End /etc/dhcp/dhclient.conf -EOF - install -dm 755 $PKG_DEST/var/lib/dhclient - - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-service-dhclient + make DESTDIR=$PKG_DEST install + + install -d $PKG_DEST/var/lib/dhcp + install -d $PKG_DEST/run/dhcp + + + install -m755 -D dhcpd.initd $PKG_DEST/etc/init.d/dhcpd + install -m644 -D dhcpd.confd $PKG_DEST/etc/conf.d/dhcpd } diff --git a/repo/system/networkmanager.xibuild b/repo/system/networkmanager.xibuild index f48cca3..c2c8fbd 100644 --- a/repo/system/networkmanager.xibuild +++ b/repo/system/networkmanager.xibuild @@ -6,10 +6,12 @@ DEPS="jansson libndp curl wpa_supplicant newt nss polkit libpsl dbus gobject-int PKG_VER=1.35.5 SOURCE=https://download.gnome.org/sources/NetworkManager/${PKG_VER%.*}/NetworkManager-$PKG_VER.tar.xz -BOOTSCRIPTS=blfs-bootscripts-20210826 ADDITIONAL=" - https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/$BOOTSCRIPTS.tar.xz - " +networkmanager.conf +networkmanager-dispatcher.initd +networkmanager.initd +networkmanager.rules +" DESC="Network connection manager and user applications" @@ -42,25 +44,13 @@ build () { package () { DESTDIR=$PKG_DEST ninja install && mv $PKG_DEST/usr/share/doc/NetworkManager \ - $PKG_DEST/usr/share/doc/NetworkManager-$PKG_VER} + $PKG_DEST/usr/share/doc/NetworkManager-$PKG_VER - # create minimum config file - cat >> $PKG_DEST/etc/NetworkManager/NetworkManager.conf << "EOF" -[main] -plugins=keyfile -EOF - cat > $PKG_DEST/etc/NetworkManager/conf.d/polkit.conf << "EOF" -[main] -auth-polkit=true -EOF - -cat > $PKG_DEST/etc/NetworkManager/conf.d/dhcp.conf << "EOF" -[main] -dhcp=dhclient -EOF + install -m644 -D networkmanager.rules \ + "$PKG_DEST/usr/share/polkit-1/rules.d/01-org.freedesktop.NetworkManager.settings.modify.system.rules" cd .. - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-networkmanager + install -m755 -D networkmanager.initd $PKG_DEST/etc/init.d/networkmanager + install -m755 -D networkmanager-dispatcher.initd $PKG_DEST/etc/init.d/networkmanager-dispatcher + install -m755 -D networkmanager.conf $PKG_DEST/etc/NetworkManager/NetworkManager.conf } diff --git a/repo/util/wpa_supplicant.xibuild b/repo/util/wpa_supplicant.xibuild index a9dca1f..294a9f4 100644 --- a/repo/util/wpa_supplicant.xibuild +++ b/repo/util/wpa_supplicant.xibuild @@ -69,9 +69,17 @@ package () { $PKG_DEST/etc/dbus-1/system.d/wpa_supplicant.conf cd .. - tar xf $BOOTSCRIPTS.tar.xz - cd $BOOTSCRIPTS - make DESTDIR=$PKG_DEST install-service-wpa + + # openrc runscripts + install -Dm755 wpa_supplicant.initd \ + $PKG_DEST/etc/init.d/wpa_supplicant + install -Dm644 wpa_supplicant.confd \ + $PKG_DEST/etc/conf.d/wpa_supplicant + install -Dm755 wpa_cli.initd \ + $PKG_DEST/etc/init.d/wpa_cli + install -Dm644 wpa_cli.confd \ + $PKG_DEST/etc/conf.d/wpa_cli + } diff --git a/repo/xi/sysconfigs.xibuild b/repo/xi/sysconfigs.xibuild index 92acddb..1dadea9 100644 --- a/repo/xi/sysconfigs.xibuild +++ b/repo/xi/sysconfigs.xibuild @@ -9,94 +9,95 @@ DESC="Default system configs for xilinux" package () { mkdir -p $PKG_DEST/etc/ mkdir -p $PKG_DEST/etc/sysconfig - cat > $PKG_DEST/etc/sysconfig/rc.site << "EOF" -# rc.site -# Distro Information -DISTRO="xilinux" # The distro name -DISTRO_CONTACT="xi@davidovski.xyz" # Bug report address -DISTRO_MINI="xi" # Short name used in filenames for distro config - -# Define custom colors used in messages printed to the screen - -# Please consult `man console_codes` for more information -# under the "ECMA-48 Set Graphics Rendition" section +# cat > $PKG_DEST/etc/sysconfig/rc.site << "EOF" +## rc.site +# +## Distro Information +#DISTRO="xilinux" # The distro name +#DISTRO_CONTACT="xi@davidovski.xyz" # Bug report address +#DISTRO_MINI="xi" # Short name used in filenames for distro config +# +## Define custom colors used in messages printed to the screen +# +## Please consult `man console_codes` for more information +## under the "ECMA-48 Set Graphics Rendition" section +## +## Warning: when switching from a 8bit to a 9bit font, +## the linux console will reinterpret the bold (1;) to +## the top 256 glyphs of the 9bit font. This does +## not affect framebuffer consoles +# +#BRACKET="\\033[1;34m" # Blue +#FAILURE="\\033[1;31m" # Red +#INFO="\\033[1;36m" # Cyan +#NORMAL="\\033[0;39m" # Grey +#SUCCESS="\\033[1;32m" # Green +#WARNING="\\033[1;33m" # Yellow +# +## Use a colored prefix +#BMPREFIX=" " +#SUCCESS_PREFIX="${SUCCESS} * ${NORMAL} " +#FAILURE_PREFIX="${FAILURE}*****${NORMAL} " +#WARNING_PREFIX="${WARNING} *** ${NORMAL} " +# +## Manually seet the right edge of message output (characters) +## Useful when resetting console font during boot to override +## automatic screen width detection +##COLUMNS=120 +# +## Interactive startup +##IPROMPT="yes" # Whether to display the interactive boot prompt +##itime="3" # The amount of time (in seconds) to display the prompt +# +## The total length of the distro welcome string, without escape codes +#wlen=$(echo "Welcome to ${DISTRO}" | wc -c ) +#welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}" +# +## The total length of the interactive string, without escape codes +##ilen=$(echo "Press 'I' to enter interactive startup" | wc -c ) +##i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup" +# +## Set scripts to skip the file system check on reboot +##FASTBOOT=yes +# +## Skip reading from the console +##HEADLESS=yes +# +## Write out fsck progress if yes +##VERBOSE_FSCK=no +# +## Speed up boot without waiting for settle in udev +##OMIT_UDEV_SETTLE=y +# +## Speed up boot without waiting for settle in udev_retry +##OMIT_UDEV_RETRY_SETTLE=yes +# +## Skip cleaning /tmp if yes +##SKIPTMPCLEAN=no +# +## For setclock +#UTC=1 +##CLOCKPARAMS= +# +## For consolelog (Note that the default, 7=debug, is noisy) +##LOGLEVEL=7 +# +## For network +#HOSTNAME=xi +# +## Delay between TERM and KILL signals at shutdown +##KILLDELAY=3 +# +## Optional sysklogd parameters +#SYSKLOGD_PARMS="-m 0" +# +## Console parameters +#UNICODE=1 +#KEYMAP="us" +#FONT="lat0-16 -m 8859-15" +#EOF # -# Warning: when switching from a 8bit to a 9bit font, -# the linux console will reinterpret the bold (1;) to -# the top 256 glyphs of the 9bit font. This does -# not affect framebuffer consoles - -BRACKET="\\033[1;34m" # Blue -FAILURE="\\033[1;31m" # Red -INFO="\\033[1;36m" # Cyan -NORMAL="\\033[0;39m" # Grey -SUCCESS="\\033[1;32m" # Green -WARNING="\\033[1;33m" # Yellow - -# Use a colored prefix -BMPREFIX=" " -SUCCESS_PREFIX="${SUCCESS} * ${NORMAL} " -FAILURE_PREFIX="${FAILURE}*****${NORMAL} " -WARNING_PREFIX="${WARNING} *** ${NORMAL} " - -# Manually seet the right edge of message output (characters) -# Useful when resetting console font during boot to override -# automatic screen width detection -#COLUMNS=120 - -# Interactive startup -#IPROMPT="yes" # Whether to display the interactive boot prompt -#itime="3" # The amount of time (in seconds) to display the prompt - -# The total length of the distro welcome string, without escape codes -wlen=$(echo "Welcome to ${DISTRO}" | wc -c ) -welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}" - -# The total length of the interactive string, without escape codes -#ilen=$(echo "Press 'I' to enter interactive startup" | wc -c ) -#i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup" - -# Set scripts to skip the file system check on reboot -#FASTBOOT=yes - -# Skip reading from the console -#HEADLESS=yes - -# Write out fsck progress if yes -#VERBOSE_FSCK=no - -# Speed up boot without waiting for settle in udev -#OMIT_UDEV_SETTLE=y - -# Speed up boot without waiting for settle in udev_retry -#OMIT_UDEV_RETRY_SETTLE=yes - -# Skip cleaning /tmp if yes -#SKIPTMPCLEAN=no - -# For setclock -UTC=1 -#CLOCKPARAMS= - -# For consolelog (Note that the default, 7=debug, is noisy) -#LOGLEVEL=7 - -# For network -HOSTNAME=xi - -# Delay between TERM and KILL signals at shutdown -#KILLDELAY=3 - -# Optional sysklogd parameters -SYSKLOGD_PARMS="-m 0" - -# Console parameters -UNICODE=1 -KEYMAP="us" -FONT="lat0-16 -m 8859-15" -EOF - cat > $PKG_DEST/etc/profile << "EOF" @@ -165,13 +166,6 @@ EOF cat > $PKG_DEST/etc/lsb-release << "EOF" LSB_VERSION=1.4 -DISTRIB_ID="xilinux" -DISTRIB_RELEASE=rolling -DISTRIB_DESCRIPTION="Xi Linux" -EOF - - cat > $PKG_DEST/etc/lsb-release << "EOF" -LSB_VERSION=1.4 DISTRIB_ID=xi DISTRIB_RELEASE=rolling DISTRIB_DESCRIPTION="XiLinux" @@ -187,8 +181,6 @@ DOCUMENTATION_URL="https://xi.davidovski.xyz" SUPPORT_URL="https://xi.davidovski.xyz" BUG_REPORT_URL="https://xi.davidovski.xyz" LOGO=xilinux-logo - EOF - } -- cgit v1.2.1