Complete Yocto mirror with license table for TQMa6UL (2038-compliance)

- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
Siggi (OpenClaw Agent)
2026-03-01 20:58:18 +00:00
commit 16accb6b24
15086 changed files with 1292356 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
SUMMARY = "helper tools for all init systems"
DESCRIPTION = "This package contains helper tools that are necessary for switching between \
the various init systems that Debian contains (e. g. sysvinit or \
systemd). An example is deb-systemd-helper, a script that enables systemd unit \
files without depending on a running systemd. \
\
It also includes the \"service\", \"invoke-rc.d\", and \"update-rc.d\" scripts which \
provide an abstraction for enabling, disabling, starting, and stopping \
services for all supported Debian init systems as specified by the policy. \
\
While this package is maintained by pkg-systemd-maintainers, it is NOT \
specific to systemd at all. Maintainers of other init systems are welcome to \
include their helpers in this package."
HOMEPAGE = "https://salsa.debian.org/debian/init-system-helpers"
SECTION = "base"
LICENSE = "BSD-3-Clause & GPL-2.0-only"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=c4ec20aa158fa9de26ee1accf78dcaae"
SRCREV = "a5439f465dc1d1d4e12329208dc321fb806009f4"
SRC_URI = "git://salsa.debian.org/debian/init-system-helpers.git;protocol=https;branch=master"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))(?!_exp)"
S = "${WORKDIR}/git"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install() {
install -d -m 0755 ${D}${sbindir}
install -m 0755 ${S}/script/invoke-rc.d ${D}${sbindir}
install -m 0755 ${S}/script/service ${D}${sbindir}
}
PACKAGES += "${PN}-invoke-rc.d ${PN}-service"
FILES:${PN} = ""
FILES:${PN}-invoke-rc.d = "${sbindir}/invoke-rc.d"
FILES:${PN}-service = "${sbindir}/service"
ALLOW_EMPTY:${PN} = "1"
RRECOMMENDS:${PN} += "${PN}-invoke-rc.d ${PN}-service"

View File

@@ -0,0 +1,17 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: alignment
# Required-Start: mountkernfs
# Required-Stop: mountkernfs
# Default-Start: S
# Default-Stop:
### END INIT INFO
if [ -e /proc/cpu/alignment ]; then
echo "3" > /proc/cpu/alignment
fi

View File

@@ -0,0 +1,28 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: banner
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
### END INIT INFO
if [ ! -e /dev/tty ]; then
/bin/mknod -m 0666 /dev/tty c 5 0
fi
if ( > /dev/tty0 ) 2>/dev/null; then
vtmaster=/dev/tty0
elif ( > /dev/vc/0 ) 2>/dev/null; then
vtmaster=/dev/vc/0
elif ( > /dev/console ) 2>/dev/null; then
vtmaster=/dev/console
else
vtmaster=/dev/null
fi
echo > $vtmaster
echo "Please wait: booting..." > $vtmaster

View File

@@ -0,0 +1,88 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: bootmisc
# Required-Start: $local_fs mountvirtfs
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Misc and other.
### END INIT INFO
TIMESTAMP_FILE=/etc/timestamp
. /etc/default/rcS
[ -f /etc/default/timestamp ] && . /etc/default/timestamp
#
# Put a nologin file in /etc to prevent people from logging in before
# system startup is complete.
#
if test "$DELAYLOGIN" = yes
then
echo "System bootup in progress - please wait" > /etc/nologin
cp /etc/nologin /etc/nologin.boot
fi
#
# Set pseudo-terminal access permissions.
#
if test -c /dev/ttyp0
then
chmod 666 /dev/tty[p-za-e][0-9a-f]
chown root:tty /dev/tty[p-za-e][0-9a-f]
fi
#
# Apply /proc settings if defined
#
SYSCTL_CONF="/etc/sysctl.conf"
if [ -f "${SYSCTL_CONF}" ]
then
if [ -x "/sbin/sysctl" ]
then
# busybox sysctl does not support -q
VERBOSE_REDIR="1>/dev/null"
if [ "${VERBOSE}" != "no" ]; then
VERBOSE_REDIR="1>&1"
fi
eval /sbin/sysctl -p "${SYSCTL_CONF}" $VERBOSE_REDIR
else
echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
fi
fi
#
# Update /etc/motd.
#
if test "$EDITMOTD" != no
then
uname -a > /etc/motd.tmp
sed 1d /etc/motd >> /etc/motd.tmp
mv /etc/motd.tmp /etc/motd
fi
#
# This is as good a place as any for a sanity check
#
# Set the system clock from hardware clock
# If the timestamp is more recent than the current time,
# use the timestamp instead.
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
if test -e "$TIMESTAMP_FILE"
then
SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M%2S`
read TIMESTAMP < "$TIMESTAMP_FILE"
if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
# format the timestamp as date expects it (2m2d2H2M4Y.2S)
TS_YR=${TIMESTAMP%??????????}
TS_SEC=${TIMESTAMP#????????????}
TS_FIRST12=${TIMESTAMP%??}
TS_MIDDLE8=${TS_FIRST12#????}
date -u ${TS_MIDDLE8}${TS_YR}.${TS_SEC}
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop
fi
fi
: exit 0

View File

@@ -0,0 +1,54 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: checkfs
# Required-Start: checkroot
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Check all other file systems
### END INIT INFO
. /etc/default/rcS
#
# Check the rest of the filesystems.
#
if test ! -f /fastboot
then
if test -f /forcefsck
then
force="-f"
else
force=""
fi
if test "$FSCKFIX" = yes
then
fix="-y"
else
fix="-a"
fi
spinner="-C"
case "$TERM" in
dumb|network|unknown|"") spinner="" ;;
esac
test "`uname -m`" = "s390" && spinner="" # This should go away
test "$VERBOSE" != no && echo "Checking all filesystems..."
fsck $spinner -R -A $fix $force
if test "$?" -gt 1
then
echo
echo "fsck failed. Please repair manually."
echo
echo "CONTROL-D will exit from this shell and continue system startup."
echo
# Start a single user shell on the console
/sbin/sulogin $CONSOLE
fi
fi
rm -f /fastboot /forcefsck
: exit 0

View File

@@ -0,0 +1,152 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: checkroot
# Required-Start: udev
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Check to root file system.
### END INIT INFO
. /etc/default/rcS
#
# Set SULOGIN in /etc/default/rcS to yes if you want a sulogin to be spawned
# from this script *before anything else* with a timeout, like SCO does.
#
test "$SULOGIN" = yes && sulogin -t 30 $CONSOLE
#
# Read /etc/fstab.
#
exec 9< /etc/fstab
rootmode=rw
rootopts=rw
rootcheck=$ENABLE_ROOTFS_FSCK
swap_on_md=no
devfs=
while read fs mnt type opts dump pass junk <&9
do
case "$fs" in
""|\#*)
continue;
;;
/dev/md*)
# Swap on md device.
test "$type" = swap && swap_on_md=yes
;;
/dev/*)
;;
*)
# Might be a swapfile.
test "$type" = swap && swap_on_md=yes
;;
esac
test "$type" = devfs && devfs="$fs"
test "$mnt" != / && continue
rootopts="$opts"
test "$pass" = 0 -o "$pass" = "" && rootcheck=no
case "$opts" in
ro|ro,*|*,ro|*,ro,*)
rootmode=ro
;;
esac
done
exec 0>&9 9>&-
# Check for conflicting configurations
if [ "$rootmode" = "ro" -a "$ROOTFS_READ_ONLY" = "no" ] || \
[ "$rootmode" = "rw" -a "$ROOTFS_READ_ONLY" = "yes" ]; then
echo ""
echo "WARN: conflicting configurations in /etc/fstab and /etc/default/rcS"
echo " regarding the writability of rootfs. Please fix one of them."
echo ""
fi
#
# Activate the swap device(s) in /etc/fstab. This needs to be done
# before fsck, since fsck can be quite memory-hungry.
#
test "$VERBOSE" != no && echo "Activating swap"
[ -x /sbin/swapon ] && swapon -a
#
# Check the root filesystem.
#
if test -f /fastboot || test "$rootcheck" = "no"
then
test $rootcheck = yes && echo "Fast boot, no filesystem check"
else
#
# Ensure that root is quiescent and read-only before fsck'ing.
#
mount -n -o remount,ro /
if test $? = 0
then
if test -f /forcefsck
then
force="-f"
else
force=""
fi
if test "$FSCKFIX" = yes
then
fix="-y"
else
fix="-a"
fi
spinner="-C"
case "$TERM" in
dumb|network|unknown|"") spinner="" ;;
esac
test `uname -m` = s390 && spinner="" # This should go away
test "$VERBOSE" != no && echo "Checking root filesystem..."
fsck $spinner $force $fix /
#
# If there was a failure, drop into single-user mode.
#
# NOTE: "failure" is defined as exiting with a return code of
# 2 or larger. A return code of 1 indicates that filesystem
# errors were corrected but that the boot may proceed.
#
if test "$?" -gt 1
then
# Surprise! Re-directing from a HERE document (as in
# "cat << EOF") won't work, because the root is read-only.
echo
echo "fsck failed. Please repair manually and reboot. Please note"
echo "that the root filesystem is currently mounted read-only. To"
echo "remount it read-write:"
echo
echo " # mount -n -o remount,rw /"
echo
echo "CONTROL-D will exit from this shell and REBOOT the system."
echo
# Start a single user shell on the console
/sbin/sulogin $CONSOLE
reboot -f
fi
else
echo "*** ERROR! Cannot fsck root fs because it is not mounted read-only!"
echo
fi
fi
#
# If the root filesystem was not marked as read-only in /etc/fstab,
# remount the rootfs rw but do not try to change mtab because it
# is on a ro fs until the remount succeeded. Then clean up old mtabs
# and finally write the new mtab.
#
mount -n -o remount,$rootmode /
if test "$rootmode" = rw
then
ln -sf /proc/mounts /dev/mtab
fi
: exit 0

View File

@@ -0,0 +1,5 @@
# GID of the `tty' group
TTYGRP=5
# Set to 600 to have `mesg n' be the default
TTYMODE=620

View File

@@ -0,0 +1,32 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: devpts
# Required-Start: udev
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Mount /dev/pts file systems.
### END INIT INFO
. /etc/default/devpts
if grep -q devpts /proc/filesystems
then
#
# Create multiplexor device.
#
test -c /dev/ptmx || mknod -m 666 /dev/ptmx c 5 2
#
# Mount /dev/pts if needed.
#
if ! grep -q devpts /proc/mounts
then
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts -ogid=${TTYGRP},mode=${TTYMODE}
fi
fi

View File

@@ -0,0 +1,21 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: dmesg
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
### END INIT INFO
if [ -f /var/log/dmesg ]; then
if LOGPATH=$(which logrotate); then
$LOGPATH -f /etc/logrotate-dmesg.conf
else
mv -f /var/log/dmesg /var/log/dmesg.old
fi
fi
dmesg -s 131072 > /var/log/dmesg

View File

@@ -0,0 +1,115 @@
# -*-Shell-script-*-
#
# functions This file contains functions to be used by most or all
# shell scripts in the /etc/init.d directory.
#
#
# SPDX-License-Identifier: GPL-2.0-only
#
NORMAL="\\033[0;39m" # Standard console grey
SUCCESS="\\033[1;32m" # Success is green
WARNING="\\033[1;33m" # Warnings are yellow
FAILURE="\\033[1;31m" # Failures are red
INFO="\\033[1;36m" # Information is light cyan
BRACKET="\\033[1;34m" # Brackets are blue
# NOTE: The pidofproc () doesn't support the process which is a script unless
# the pidof supports "-x" option. If you want to use it for such a
# process:
# 1) If there is no "pidof -x", replace the "pidof $1" with another
# command like(for core-image-minimal):
# ps | awk '/'"$1"'/ {print $1}'
# Or
# 2) If there is "pidof -x", replace "pidof" with "pidof -x".
#
# pidofproc - print the pid of a process
# $1: the name of the process
pidofproc () {
# pidof output null when no program is running, so no "2>/dev/null".
pid=`pidof $1`
status=$?
case $status in
0)
echo $pid
return 0
;;
127)
echo "ERROR: command pidof not found" >&2
exit 127
;;
*)
return $status
;;
esac
}
machine_id() { # return the machine ID
awk 'BEGIN { FS=": " } /Hardware/ \
{ gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
}
killproc() { # kill the named process(es)
pid=`pidofproc $1` && kill $pid
}
status() {
local pid
if [ "$#" = 0 ]; then
echo "Usage: status {program}"
return 1
fi
pid=`pidofproc $1`
if [ -n "$pid" ]; then
echo "$1 (pid $pid) is running..."
return 0
else
echo "$1 is stopped"
fi
return 3
}
success() {
echo -n -e "${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}"
return 0
}
failure() {
local rc=$*
echo -n -e "${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
return $rc
}
warning() {
local rc=$*
echo -n -e "${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
return $rc
}
passed() {
local rc=$*
echo -n -e "${BRACKET}[${SUCCESS} PASS ${BRACKET}]${NORMAL}"
return $rc
}
log_success_msg()
{
echo -n $@
success
echo
}
log_failure_msg()
{
echo -n $@
failure
echo
}
log_warning_msg()
{
echo -n $@
warning
echo
}

View File

@@ -0,0 +1,33 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: halt
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 0
# Short-Description: Execute the halt command.
# Description:
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# See if we need to cut the power.
if test -x /etc/init.d/ups-monitor
then
/etc/init.d/ups-monitor poweroff
fi
# Don't shut down drives if we're using RAID.
hddown="-h"
if grep -qs '^md.*active' /proc/mdstat
then
hddown=""
fi
halt SED_HALTARGS -p $hddown
: exit 0

View File

@@ -0,0 +1,26 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: hostname
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Set hostname based on /etc/hostname
### END INIT INFO
HOSTNAME=$(/bin/hostname)
hostname -b -F /etc/hostname 2> /dev/null
if [ $? -eq 0 ]; then
exit
fi
# Busybox hostname doesn't support -b so we need implement it on our own
if [ -f /etc/hostname ];then
hostname `cat /etc/hostname`
elif [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" -o ! -z "`echo $HOSTNAME | sed -n '/^[0-9]*\.[0-9].*/p'`" ] ; then
hostname localhost
fi

View File

@@ -0,0 +1,9 @@
# see "man logrotate" for details
# rotate dmesg, and keep 5 versions.
/var/log/dmesg {
create
rotate 5
nodateext
}

View File

@@ -0,0 +1,49 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: mountall
# Required-Start: mountvirtfs
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Mount all filesystems.
# Description:
### END INIT INFO
. /etc/default/rcS
#
# Mount local filesystems in /etc/fstab. For some reason, people
# might want to mount "proc" several times, and mount -v complains
# about this. So we mount "proc" filesystems without -v.
#
test "$VERBOSE" != no && echo "Mounting local filesystems..."
mount -at nonfs,nosmbfs,noncpfs 2>/dev/null
# We might have mounted something over /run; see if
# /dev/initctl is present. Look for
# /sbin/init.sysvinit to verify that sysvinit (and
# not busybox or systemd) is installed as default init).
INITCTL="/dev/initctl"
if [ ! -p "$INITCTL" ] && [ "${INIT_SYSTEM}" = "sysvinit" ]; then
# Create new control channel
rm -f "$INITCTL"
mknod -m 600 "$INITCTL" p
# Reopen control channel.
PID="$(pidof -s /sbin/init || echo 1)"
[ -n "$PID" ] && kill -s USR1 "$PID"
fi
#
# Execute swapon command again, in case we want to swap to
# a file on a now mounted filesystem.
#
[ -x /sbin/swapon ] && swapon -a
: exit 0

View File

@@ -0,0 +1,95 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: mountnfs
# Required-Start: $local_fs $network $rpcbind
# Required-Stop:
# Default-Start: S
# Default-Stop:
### END INIT INFO
#
# Run in a subshell because of I/O redirection.
#
test -f /etc/fstab && (
#
# Read through fstab line by line. If it is NFS, set the flag
# for mounting NFS filesystems. If any NFS partition is found and it
# not mounted with the nolock option, we start the rpcbind.
#
rpcbind=no
mount_nfs=no
mount_smb=no
mount_ncp=no
mount_cifs=no
while read device mountpt fstype options
do
case "$device" in
""|\#*)
continue
;;
esac
case "$options" in
*noauto*)
continue
;;
esac
if test "$fstype" = nfs
then
mount_nfs=yes
case "$options" in
*nolock*)
;;
*)
rpcbind=yes
;;
esac
fi
if test "$fstype" = smbfs
then
mount_smb=yes
fi
if test "$fstype" = ncpfs
then
mount_ncp=yes
fi
if test "$fstype" = cifs
then
mount_cifs=yes
fi
done
exec 0>&1
if test "$rpcbind" = yes
then
if test -x /usr/sbin/rpcbind
then
service rpcbind status > /dev/null
if [ $? != 0 ]; then
echo -n "Starting rpcbind..."
start-stop-daemon --start --quiet --exec /usr/sbin/rpcbind
sleep 2
fi
fi
fi
if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes || test "$mount_cifs" = yes
then
echo "Mounting remote filesystems..."
test "$mount_nfs" = yes && mount -a -t nfs
test "$mount_smb" = yes && mount -a -t smbfs
test "$mount_ncp" = yes && mount -a -t ncpfs
test "$mount_cifs" = yes && mount -a -t cifs
fi
) < /etc/fstab
: exit 0

View File

@@ -0,0 +1,277 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: volatile
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop:
# Short-Description: Populate the volatile filesystem
### END INIT INFO
# Get ROOT_DIR
DIRNAME="$(dirname "$0")"
ROOT_DIR="$(echo "$DIRNAME" | sed -ne 's:/etc/.*::p')"
[ -e "${ROOT_DIR}/etc/default/rcS" ] && . "${ROOT_DIR}/etc/default/rcS"
# When running populate-volatile.sh at rootfs time, disable cache.
[ -n "$ROOT_DIR" ] && VOLATILE_ENABLE_CACHE=no
# If rootfs is read-only, disable cache.
[ "$ROOTFS_READ_ONLY" = "yes" ] && VOLATILE_ENABLE_CACHE=no
CFGDIR="${ROOT_DIR}/etc/default/volatiles"
TMPROOT="${ROOT_DIR}/var/volatile/tmp"
COREDEF="00_core"
[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
create_file() {
EXEC=""
if [ -z "$2" ]; then
EXEC="
touch \"$1\";
"
else
EXEC="
cp \"$2\" \"$1\";
"
fi
EXEC="
${EXEC}
chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\";
chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" "
test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
if [ -e "$1" ]; then
[ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
else
if [ -z "$ROOT_DIR" ]; then
eval "$EXEC"
else
# Creating some files at rootfs time may fail and should fail,
# but these failures should not be logged to make sure the do_rootfs
# process doesn't fail. This does no harm, as this script will
# run on target to set up the correct files and directories.
eval "$EXEC" > /dev/null 2>&1
fi
fi
}
mk_dir() {
EXEC="
mkdir -p \"$1\";
chown ${TUSER}:${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\";
chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" "
test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
if [ -e "$1" ]; then
[ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
else
if [ -z "$ROOT_DIR" ]; then
eval "$EXEC"
else
# For the same reason with create_file(), failures should
# not be logged.
eval "$EXEC" > /dev/null 2>&1
fi
fi
}
link_file() {
EXEC="
if [ -L \"$2\" ]; then
[ \"\$(readlink \"$2\")\" != \"$1\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
elif [ -d \"$2\" ]; then
if awk '\$2 == \"$2\" {exit 1}' /proc/mounts; then
cp -a $2/* $1 2>/dev/null;
cp -a $2/.[!.]* $1 2>/dev/null;
rm -rf \"$2\";
ln -sf \"$1\" \"$2\";
fi
else
ln -sf \"$1\" \"$2\";
fi
"
test "$VOLATILE_ENABLE_CACHE" = yes && echo " $EXEC" >> /etc/volatile.cache.build
if [ -z "$ROOT_DIR" ]; then
eval "$EXEC"
else
# For the same reason with create_file(), failures should
# not be logged.
eval "$EXEC" > /dev/null 2>&1
fi
}
check_requirements() {
cleanup() {
rm "${TMP_INTERMED}"
rm "${TMP_DEFINED}"
rm "${TMP_COMBINED}"
}
CFGFILE="$1"
TMP_INTERMED="${TMPROOT}/tmp.$$"
TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
sed 's@\(^:\)*:.*@\1@' "${ROOT_DIR}/etc/passwd" | sort | uniq > "${TMP_DEFINED}"
grep -v "^#" "${CFGFILE}" | cut -s -d " " -f 2 > "${TMP_INTERMED}"
cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
NR_DEFINED_USERS="$(wc -l < "${TMP_DEFINED}")"
NR_COMBINED_USERS="$(wc -l < "${TMP_COMBINED}")"
[ "${NR_DEFINED_USERS}" -ne "${NR_COMBINED_USERS}" ] && {
echo "Undefined users:"
diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
cleanup
return 1
}
sed 's@\(^:\)*:.*@\1@' "${ROOT_DIR}/etc/group" | sort | uniq > "${TMP_DEFINED}"
grep -v "^#" "${CFGFILE}" | cut -s -d " " -f 3 > "${TMP_INTERMED}"
cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
NR_DEFINED_GROUPS="$(wc -l < "${TMP_DEFINED}")"
NR_COMBINED_GROUPS="$(wc -l < "${TMP_COMBINED}")"
[ "${NR_DEFINED_GROUPS}" -ne "${NR_COMBINED_GROUPS}" ] && {
echo "Undefined groups:"
diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
cleanup
return 1
}
# Add checks for required directories here
cleanup
return 0
}
apply_cfgfile() {
CFGFILE="$1"
SKIP_REQUIREMENTS="$2"
[ "${VERBOSE}" != "no" ] && echo "Applying ${CFGFILE}"
[ "${SKIP_REQUIREMENTS}" = "yes" ] || check_requirements "${CFGFILE}" || {
echo "Skipping ${CFGFILE}"
return 1
}
sed 's/#.*//' "${CFGFILE}" | \
while read -r TTYPE TUSER TGROUP TMODE TNAME TLTARGET; do
test -z "${TLTARGET}" && continue
TNAME=${ROOT_DIR}${TNAME}
[ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
[ "${TTYPE}" = "l" ] && {
TSOURCE="$TLTARGET"
[ "${VERBOSE}" != "no" ] && echo "Creating link -${TNAME}- pointing to -${TSOURCE}-."
link_file "${TSOURCE}" "${TNAME}"
continue
}
[ "${TTYPE}" = "b" ] && {
TSOURCE="$TLTARGET"
[ "${VERBOSE}" != "no" ] && echo "Creating mount-bind -${TNAME}- from -${TSOURCE}-."
mount --bind "${TSOURCE}" "${TNAME}"
EXEC="
mount --bind \"${TSOURCE}\" \"${TNAME}\""
test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
continue
}
[ -L "${TNAME}" ] && {
[ "${VERBOSE}" != "no" ] && echo "Found link."
NEWNAME=$(ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/')
if echo "${NEWNAME}" | grep -v "^/" >/dev/null; then
TNAME="$(echo "${TNAME}" | sed -e 's@\(.*\)/.*@\1@')/${NEWNAME}"
[ "${VERBOSE}" != "no" ] && echo "Converted relative linktarget to absolute path -${TNAME}-."
else
TNAME="${NEWNAME}"
[ "${VERBOSE}" != "no" ] && echo "Using absolute link target -${TNAME}-."
fi
}
case "${TTYPE}" in
"f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
TSOURCE="$TLTARGET"
[ "${TSOURCE}" = "none" ] && TSOURCE=""
create_file "${TNAME}" "${TSOURCE}"
;;
"d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
mk_dir "${TNAME}"
# Add check to see if there's an entry in fstab to mount.
;;
*) [ "${VERBOSE}" != "no" ] && echo "Invalid type -${TTYPE}-."
continue
;;
esac
done
return 0
}
clearcache=0
exec 9</proc/cmdline
while read -r line <&9
do
case "$line" in
*clearcache*) clearcache=1
;;
*) continue
;;
esac
done
exec 9>&-
if test -e "${ROOT_DIR}/etc/volatile.cache" -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" -a "x$clearcache" = "x0"
then
sh "${ROOT_DIR}/etc/volatile.cache"
else
rm -f "${ROOT_DIR}/etc/volatile.cache" "${ROOT_DIR}/etc/volatile.cache.build"
# Apply the core file with out checking requirements. ${TMPROOT} is
# needed by check_requirements but is setup by this file, so it must be
# processed first and without being checked.
[ -e "${CFGDIR}/${COREDEF}" ] && apply_cfgfile "${CFGDIR}/${COREDEF}" "yes"
# Fast path: check_requirements is slow and most of the time doesn't
# find any problems. If there are a lot of config files, it is much
# faster to to concatenate them all together and process them once to
# avoid the overhead of calling check_requirements repeatedly
TMP_FILE="${TMPROOT}/tmp_volatile.$$"
rm -f "$TMP_FILE"
CFGFILES="$(ls -1 "${CFGDIR}" | grep -v "^${COREDEF}\$" | sort)"
for file in ${CFGFILES}; do
cat "${CFGDIR}/${file}" >> "$TMP_FILE"
done
if check_requirements "$TMP_FILE"
then
apply_cfgfile "$TMP_FILE" "yes"
else
# Slow path: One or more config files failed requirements.
# Process each one individually so the offending one can be
# skipped
for file in ${CFGFILES}; do
apply_cfgfile "${CFGDIR}/${file}"
done
fi
rm "$TMP_FILE"
[ -e "${ROOT_DIR}/etc/volatile.cache.build" ] && sync && mv "${ROOT_DIR}/etc/volatile.cache.build" "${ROOT_DIR}/etc/volatile.cache"
fi
if [ -z "${ROOT_DIR}" ] && [ -f /etc/ld.so.cache ] && [ ! -f /var/run/ld.so.cache ]
then
ln -s /etc/ld.so.cache /var/run/ld.so.cache
fi

View File

@@ -0,0 +1,46 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
. /etc/default/rcS
[ "$ROOTFS_READ_ONLY" = "no" ] && exit 0
is_on_read_only_partition () {
DIRECTORY=$1
dir=`readlink -f $DIRECTORY`
while true; do
if [ ! -d "$dir" ]; then
echo "ERROR: $dir is not a directory"
exit 1
else
for flag in `awk -v dir=$dir '{ if ($2 == dir) { print "FOUND"; split($4,FLAGS,",") } }; \
END { for (f in FLAGS) print FLAGS[f] }' < /proc/mounts`; do
[ "$flag" = "FOUND" ] && partition="read-write"
[ "$flag" = "ro" ] && { partition="read-only"; break; }
done
if [ "$dir" = "/" -o -n "$partition" ]; then
break
else
dir=`dirname $dir`
fi
fi
done
[ "$partition" = "read-only" ] && echo "yes" || echo "no"
}
if [ "$1" = "start" ] ; then
if [ `is_on_read_only_partition /var/lib` = "yes" ]; then
grep -q "tmpfs /var/volatile" /proc/mounts || mount /var/volatile
mkdir -p /var/volatile/lib
mkdir -p /var/volatile/.lib-work
# Try to mount using overlay, which is much faster than copying
# files. If that fails, fallback to the slower copy
if ! mount -t overlay overlay SED_VARLIBMOUNTARGS -olowerdir=/var/lib,upperdir=/var/volatile/lib,workdir=/var/volatile/.lib-work /var/lib > /dev/null 2>&1; then
cp -a /var/lib/* /var/volatile/lib
mount SED_VARLIBMOUNTARGS --bind /var/volatile/lib /var/lib
fi
fi
fi

View File

@@ -0,0 +1,19 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: reboot
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 6
# Short-Description: Execute the reboot command.
# Description:
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
echo -n "Rebooting... "
reboot SED_HALTARGS

View File

@@ -0,0 +1,24 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: rmnologin
# Required-Start: $remote_fs $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Remove /etc/nologin at boot
# Description: This script removes the /etc/nologin file as the
# last step in the boot process, if DELAYLOGIN=yes.
# If DELAYLOGIN=no, /etc/nologin was not created by
# bootmisc earlier in the boot process.
### END INIT INFO
if test -f /etc/nologin.boot
then
rm -f /etc/nologin /etc/nologin.boot
fi
: exit 0

View File

@@ -0,0 +1,21 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: save-rtc
# Required-Start:
# Required-Stop: $local_fs hwclock
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Store system clock into file
# Description:
### END INIT INFO
TIMESTAMP_FILE=/etc/timestamp
[ -f /etc/default/timestamp ] && . /etc/default/timestamp
# Update the timestamp
date -u +%4Y%2m%2d%2H%2M%2S 2>/dev/null > "$TIMESTAMP_FILE"

View File

@@ -0,0 +1,25 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: sendsigs
# Required-Start:
# Required-Stop: umountnfs
# Default-Start:
# Default-Stop: 0 6
# Short-Description: Kill all remaining processes.
# Description:
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Kill all processes.
echo "Sending all processes the TERM signal..."
killall5 -15
sleep 5
echo "Sending all processes the KILL signal..."
killall5 -9
: exit 0

View File

@@ -0,0 +1,28 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: single
# Required-Start: $local_fs $all killprocs
# Required-Stop:
# Default-Start: 1
# Default-Stop:
# Short-Description: executed by init(8) upon entering runlevel 1 (single).
### END INIT INFO
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
# Kill all processes.
echo "Sending all processes the TERM signal..."
killall5 -15
sleep 5
echo "Sending all processes the KILL signal..."
killall5 -9
# We start update here, since we just killed it.
test -x /sbin/update && update
echo "Entering single-user mode..."
exec init -t1 S

View File

@@ -0,0 +1,8 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
[ -z "$SUSHELL" ] && SUSHELL=/bin/sh
exec $SUSHELL

View File

@@ -0,0 +1,39 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: mountvirtfs
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Mount kernel virtual file systems.
# Description: Mount initial set of virtual filesystems the kernel
# provides and that are required by everything.
### END INIT INFO
if [ -e /proc ] && ! [ -e /proc/mounts ]; then
mount -t proc proc /proc
fi
if [ -e /sys ] && grep -q sysfs /proc/filesystems && ! [ -e /sys/class ]; then
mount -t sysfs sysfs /sys
fi
if [ -e /sys/kernel/debug ] && grep -q debugfs /proc/filesystems; then
mount -t debugfs debugfs /sys/kernel/debug
fi
if [ -e /sys/kernel/config ] && grep -q configfs /proc/filesystems; then
mount -t configfs configfs /sys/kernel/config
fi
if [ -e /sys/firmware/efi/efivars ] && grep -q efivarfs /proc/filesystems; then
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
fi
if ! [ -e /dev/zero ] && [ -e /dev ] && grep -q devtmpfs /proc/filesystems; then
mount -n -t devtmpfs devtmpfs /dev
fi

View File

@@ -0,0 +1,28 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: umountfs
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop: 0 6
# Short-Description: Turn off swap and unmount all local file systems.
# Description:
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
echo "Deactivating swap..."
[ -x /sbin/swapoff ] && swapoff -a
# We leave /proc mounted.
echo "Unmounting local filesystems..."
grep -q /mnt/ram /proc/mounts && mount -o remount,ro /mnt/ram
mount -o remount,ro /
umount -f -a -r > /dev/null 2>&1
: exit 0

View File

@@ -0,0 +1,37 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: umountnfs
# Required-Start:
# Required-Stop: umountfs
# Should-Stop: $network $portmap
# Default-Start:
# Default-Stop: 0 6
# Short-Description: Unmount all network filesystems
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Write a reboot record to /var/log/wtmp before unmounting
halt -w
echo "Unmounting remote filesystems..."
test -f /etc/fstab && (
#
# Read through fstab line by line and unount network file systems
#
while read device mountpt fstype options
do
if test "$fstype" = nfs || test "$fstype" = smbfs || test "$fstype" = ncpfs || test "$fstype" = cifs
then
umount -f $mountpt
fi
done
) < /etc/fstab
: exit 0

View File

@@ -0,0 +1,53 @@
#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-only
#
### BEGIN INIT INFO
# Provides: urandom
# Required-Start: $local_fs mountvirtfs
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Save and restore the random seed
# Description: Save the random seed on shutdown and restore it on boot,
# to ensure that the seed isn't predicable on startup
# (because the boot process is predictable)
### END INIT INFO
test -c /dev/urandom || exit 0
RANDOM_SEED_FILE=/var/lib/urandom/random-seed
. /etc/default/rcS
[ -f /etc/default/urandom ] && . /etc/default/urandom
case "$1" in
start|"")
test "$VERBOSE" != no && echo "Initializing random number generator..."
# Load and then save 512 bytes, which is the size of the entropy
# pool. Also load the current date, in case the seed file is
# empty.
( date +%s.%N; [ -f "$RANDOM_SEED_FILE" ] && cat "$RANDOM_SEED_FILE" ) \
>/dev/urandom
rm -f "$RANDOM_SEED_FILE"
umask 077
dd if=/dev/urandom of=$RANDOM_SEED_FILE count=1 \
>/dev/null 2>&1 || echo "urandom start: failed."
umask 022
;;
stop)
# Carry a random seed from shut-down to start-up;
# see documentation in linux/drivers/char/random.c
test "$VERBOSE" != no && echo "Saving random seed..."
umask 077
dd if=/dev/urandom of=$RANDOM_SEED_FILE count=1 \
>/dev/null 2>&1 || echo "urandom stop: failed."
;;
*)
echo "Usage: urandom {start|stop}" >&2
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,37 @@
# This configuration file lists filesystem objects that should get verified
# during startup and be created if missing.
#
# Entries have the following format:
# <type> <owner> <group> <mode> <path> <linksource>
# where the items are separated by whitespace !
#
# The # character introduces a comment lasting until end of line.
# Blank lines are ignored.
#
# <type> : d|f|l|b : (d)irectory|(f)ile|(l)ink|(b)ind
#
# A linking example:
# l root root 0777 /var/test /tmp/testfile
# f root root 0644 /var/test none
#
# Understanding links:
# When populate-volatile is to verify/create a directory or file, it will first
# check it's existence. If a link is found to exist in the place of the target,
# the path of the target is replaced with the target the link points to.
# Thus, if a link is in the place to be verified, the object will be created
# in the place the link points to instead.
# This explains the order of "link before object" as in the example above, where
# a link will be created at /var/test pointing to /tmp/testfile and due to this
# link the file defined as /var/test will actually be created as /tmp/testfile.
d root root 1777 /run/lock none
d root root 0755 /var/volatile/log none
d root root 1777 /var/volatile/tmp none
l root root 1777 /var/lock /run/lock
l root root 0755 /var/run /run
l root root 1777 /var/tmp /var/volatile/tmp
l root root 1777 /tmp /var/tmp
d root root 0755 /var/lock/subsys none
f root root 0664 /var/log/wtmp none
f root root 0664 /var/run/utmp none
l root root 0644 /etc/resolv.conf /var/run/resolv.conf
f root root 0644 /var/run/resolv.conf none

View File

@@ -0,0 +1,191 @@
SUMMARY = "SysV init scripts"
HOMEPAGE = "https://github.com/fedora-sysv/initscripts"
DESCRIPTION = "Initscripts provide the basic system startup initialization scripts for the system. These scripts include actions such as filesystem mounting, fsck, RTC manipulation and other actions routinely performed at system startup. In addition, the scripts are also used during system shutdown to reverse the actions performed at startup."
SECTION = "base"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://functions;beginline=7;endline=7;md5=829e563511c9a1d6d41f17a7a4989d6a"
INHIBIT_DEFAULT_DEPS = "1"
SRC_URI = "file://functions \
file://halt \
file://umountfs \
file://devpts.sh \
file://devpts \
file://hostname.sh \
file://mountall.sh \
file://banner.sh \
file://bootmisc.sh \
file://mountnfs.sh \
file://reboot \
file://checkfs.sh \
file://single \
file://sendsigs \
file://urandom \
file://rmnologin.sh \
file://checkroot.sh \
file://umountnfs.sh \
file://sysfs.sh \
file://populate-volatile.sh \
file://read-only-rootfs-hook.sh \
file://volatiles \
file://save-rtc.sh \
file://dmesg.sh \
file://logrotate-dmesg.conf \
${@bb.utils.contains('DISTRO_FEATURES','selinux','file://sushell','',d)} \
"
S = "${WORKDIR}"
SRC_URI:append:arm = " file://alignment.sh"
SRC_URI:append:armeb = " file://alignment.sh"
KERNEL_VERSION = ""
DEPENDS:append = " update-rc.d-native"
PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
PACKAGES =+ "${PN}-functions ${PN}-sushell"
RDEPENDS:${PN} = "initd-functions \
${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \
init-system-helpers-service \
"
# Recommend pn-functions so that it will be a preferred default provider for initd-functions
RRECOMMENDS:${PN} = "${PN}-functions"
RPROVIDES:${PN}-functions = "initd-functions"
FILES:${PN}-functions = "${sysconfdir}/init.d/functions*"
FILES:${PN}-sushell = "${base_sbindir}/sushell"
HALTARGS ?= "-d -f"
VARLIBMOUNTARGS ?= ""
do_configure() {
sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/halt
sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/reboot
sed -i -e "s:SED_VARLIBMOUNTARGS:${VARLIBMOUNTARGS}:g" ${WORKDIR}/read-only-rootfs-hook.sh
}
do_install () {
#
# Create directories and install device independent scripts
#
install -d ${D}${sysconfdir}/init.d
install -d ${D}${sysconfdir}/rcS.d
install -d ${D}${sysconfdir}/rc0.d
install -d ${D}${sysconfdir}/rc1.d
install -d ${D}${sysconfdir}/rc2.d
install -d ${D}${sysconfdir}/rc3.d
install -d ${D}${sysconfdir}/rc4.d
install -d ${D}${sysconfdir}/rc5.d
install -d ${D}${sysconfdir}/rc6.d
install -d ${D}${sysconfdir}/default
install -d ${D}${sysconfdir}/default/volatiles
# Holds state information pertaining to urandom
install -d ${D}${localstatedir}/lib/urandom
install -m 0644 ${WORKDIR}/functions ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/checkroot.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/halt ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/hostname.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/mountall.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/mountnfs.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/reboot ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/rmnologin.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/sendsigs ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/single ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/urandom ${D}${sysconfdir}/init.d
sed -i ${D}${sysconfdir}/init.d/urandom -e 's,/var/,${localstatedir}/,g;s,/etc/,${sysconfdir}/,g'
install -m 0755 ${WORKDIR}/devpts.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/devpts ${D}${sysconfdir}/default
install -m 0755 ${WORKDIR}/sysfs.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
if [ ${@ oe.types.boolean('${VOLATILE_LOG_DIR}') } = True ]; then
sed -i -e '\@^d root root 0755 /var/volatile/log none$@ a\l root root 0755 /var/log /var/volatile/log' \
${D}${sysconfdir}/default/volatiles/00_core
fi
if [ "${VOLATILE_TMP_DIR}" != "yes" ]; then
sed -i -e "/\<tmp\>/d" ${D}${sysconfdir}/default/volatiles/00_core
fi
install -m 0755 ${WORKDIR}/dmesg.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/logrotate-dmesg.conf ${D}${sysconfdir}/
if [ "${TARGET_ARCH}" = "arm" ]; then
install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
fi
if ${@bb.utils.contains('DISTRO_FEATURES','selinux','true','false',d)}; then
install -d ${D}/${base_sbindir}
install -m 0755 ${WORKDIR}/sushell ${D}/${base_sbindir}
fi
#
# Install device dependent scripts
#
install -m 0755 ${WORKDIR}/banner.sh ${D}${sysconfdir}/init.d/banner.sh
install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d/umountfs
#
# Create runlevel links
#
update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 .
update-rc.d -r ${D} sendsigs start 20 0 6 .
update-rc.d -r ${D} urandom start 38 S 0 6 .
update-rc.d -r ${D} umountnfs.sh stop 31 0 1 6 .
update-rc.d -r ${D} umountfs start 40 0 6 .
update-rc.d -r ${D} reboot start 90 6 .
update-rc.d -r ${D} halt start 90 0 .
update-rc.d -r ${D} save-rtc.sh start 25 0 6 .
update-rc.d -r ${D} banner.sh start 02 S .
update-rc.d -r ${D} checkroot.sh start 05 S .
update-rc.d -r ${D} mountall.sh start 03 S .
update-rc.d -r ${D} hostname.sh start 39 S .
update-rc.d -r ${D} mountnfs.sh start 15 2 3 4 5 .
update-rc.d -r ${D} bootmisc.sh start 36 S .
update-rc.d -r ${D} sysfs.sh start 02 S .
update-rc.d -r ${D} populate-volatile.sh start 37 S .
update-rc.d -r ${D} read-only-rootfs-hook.sh start 29 S .
update-rc.d -r ${D} devpts.sh start 06 S .
if [ "${TARGET_ARCH}" = "arm" ]; then
update-rc.d -r ${D} alignment.sh start 06 S .
fi
# We wish to have /var/log ready at this stage so execute this after
# populate-volatile.sh
update-rc.d -r ${D} dmesg.sh start 38 S .
}
MASKED_SCRIPTS = " \
banner \
bootmisc \
checkfs \
checkroot \
devpts \
dmesg \
hostname \
mountall \
mountnfs \
populate-volatile \
read-only-rootfs-hook \
rmnologin \
sysfs \
urandom"
pkg_postinst:${PN} () {
if type systemctl >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
for SERVICE in ${MASKED_SCRIPTS}; do
systemctl $OPTS mask $SERVICE.service
done
fi
# Delete any old volatile cache script, as directories may have moved
if [ -z "$D" ]; then
rm -f "/etc/volatile.cache"
fi
}
CONFFILES:${PN} += "${sysconfdir}/init.d/checkroot.sh"