summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit
AgeCommit message (Collapse)Author
2023-12-13sysvinit: Include libgen.h for basename APIKhem Raj
This fixes build with latest musl which drops basename declaration API from string.h Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-10-09sysvinit-inittab: use ttyrun to run getty only if the terminal existsRoss Burton
Wrap calls to start_getty with ttyrun, so that getty isn't started if the device doesn't exist. As we know start_getty is only called when the device exists we can remove the partial workaround for this problem in that scripts too. This neatly obsoletes SERIAL_CONSOLES_CHECK, whose sole purpose was to check what terminals are present at boot and rewrite inittab. Notably, this meant that SERIAL_CONSOLES_CHECK made using a read-only rootfs impossible. (From OE-Core rev: f4fd17d5a5e4eaa31995d3ca52c871cfbdc0df68) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-09sysvinit-initab: rewrite loop to generate inittabRoss Burton
Instead of one-letter variables and arcane sed expressions, use English words and 'cut'. (From OE-Core rev: de9833792dd0cfac6f17d5c733c263b976e89cf6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22recipes: Drop remaining PR values from recipesRichard Purdie
We've been removing PR values from recipes at upgrade time for a while. In general anyone maintaining a binary distro would end up having to curate these themselves so the values in OE-Core aren't really that useful anymore. In many ways it makes sense to clear out the remaining ones (which are mostly for 'config' recipes that are unlikely to increase in PV) and leave a clean slate for anyone implementing a binary distro config. References are left in meta-selftest since the tests there do involve them and their removal upon upgrade. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-02sysvinit: send install.patch upstreamAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2022-08-21sysvinit-inittab/start_getty: Fix respawn too fastBertrand Marquis
When an entry in /dev does not exist, start_getty is returning directly. As it is started from init in a respawn mode, it will loop infinitely. In this case add a sleep inside start_getty to prevent the "Respawning too fast" message popping up every 5 minutes. This case is happening quite often when the system is started as an hypervisor guest as the standard serial line is usually taken by it and removed from the configuration. This was triggered quite often running linux as dom0 on top of Xen on arm as the serial line is taken by Xen and removed from the device tree. Use the opportunity to replace one tab with spaces as the rest of the file is using spaces. Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12sysvinit: Fix mount.h conflicts seen with glibc 2.36+Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2022-08-12classes: rootfs-postcommands: autologin root on serial-gettyJohannes Schneider
when empty-root-password AND serial-autologin-root are part of the IMAGE_FEATURES, save some of the developers time by not having to type the (then still sole) 'root' username on the serial console after each and every reboot this is done by inserting '--autologin root' into the command line of the responsible 'getty' service Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-05sysvinit: update 3.02 -> 3.04Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-19sysvinit: upgrade 3.01 -> 3.02wangmy
pidof-add-m-option.patch refreshed for new version. Add 0001-Fixed-compile-error-on-GNU-Hurd.patch to fix compile error on GNU Hurd due to missing MAX_PATH definition. Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie
license identifiers An automated conversion using scripts/contrib/convert-spdx-licenses.py to convert to use the standard SPDX license identifiers. Two recipes in meta-selftest were not converted as they're that way specifically for testing. A change in linux-firmware was also skipped and may need a more manual tweak. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-21sysvinit: upgrade 3.00 -> 3.01wangmy
refresh pidof-add-m-option.patch Changelog: ========== * Default to showing processes in the uninterruptable state (D). The -z flag no longer affects whether processes in D state are shown. The -z flag does still toggle whether zombie (Z) processes are shown. * Removed unnecessary check which is always true from init tab parsing. Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-21patches: correct whitespace/spelling for Upstream-Status tagsAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-23sysvinit: upgrade 2.99 -> 3.00Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-30Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18Revert "inittab: Add getty launch on hvc0 for qemuppc64"Kevin Hao
This reverts commit ed69ef20167da0986bc9363d1a91e62001995af4. The console entry has already been added into /etc/inittab based on the SERIAL_CONSOLES. So drop this redundant entry. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18sysvinit-inittab/start_getty: Check /sys for the tty device existenceKevin Hao
The hvc tty driver doesn't populate a file like /proc/tty/driver/serial, so the current implementation of start_getty doesn't work for the hvc console. By checking the /sys/class/tty/ for the tty device existence, it should support more console types and also make the codes more simple. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-11inittab: Add getty launch on hvc0 for qemuppc64Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-02sysvinit: upgrade 2.98 -> 2.99zhengruoqin
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-21recipes: Update common-licenses references to match new namesRichard Purdie
The licenses were renamed to match their SPDX names, fix the references in LIC_FILES_CHKSUM in OE-Core. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-05psplash (sysvinit): add textual updatesTrevor Woerner
The psplash program contains a hidden text box immediately above the progress bar. Any text sent via a "MSG" command through psplash's fifo will be displayed, centred, above the progress bar. Add the ability to show which startup script is currently running, in sync with updates to the progress bar. If a startup script takes a bit longer than others and the progress bar stops momentarily, this allows the user to know which script is responsible. This feature is added with a knob, default off, for enabling or disabling this feature. The knob is in the form of a PACKAGECONFIG against the sysvinit recipe: psplash-text-updates NOTE: this knob can be changed in the filesystem at runtime by editing /etc/default/rcS regardless of how it is set in the build. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-05psplash: fix working on first boot (sysvinit)Trevor Woerner
The psplash program has a mechanism for showing updates graphically in the form of a progress bar. The program is told when and how much to fill the progress bar via text messages sent through a fifo. If the fifo doesn't exist when the psplash program starts, it tries to create it. If the fifo doesn't exist or can't be created, the psplash program will refuse to run. In various circumstances when a system is booted for the very first time, the filesystem is mounted, initially, read-only. As a result the psplash program is not able to run. On systems where the root filesystem is not meant to be read-only, it will eventually be mounted read-write. Therefore the psplash program can run on shutdown, and all subsequent boots. Only the first boot is affected. If a fifo is created and included in the filesystem as part of the recipe, then filesystems that are meant to be read-only will have psplash work, as well as the cases where (on first boot) a read-write filesystem is initially mounted read-only. NOTE: this is only an issue with sysvinit, and non-qemu machines. systemd-based systems don't suffer from this first-boot issue, and neither do the qemu machines. NOTE 2: when psplash is done, it removes the fifo. Therefore the fifo used for communicating with psplash doesn't hang around unnecessarily in the filesystem. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-05PSPLASH_FIFO_DIR: refactorTrevor Woerner
Add an entry for the psplash fifo directory to /etc/default/rcS and have the pieces of code that need it source it from there rather than duplicating the definition in multiple places throughout the code. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30sysvinit: upgrade 2.97 -> 2.98Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20rcS: Define identifier for init system usedKhem Raj
This will help in defining init system specific portions of initscripts which are shared Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Sinan Kaya <okaya@kernel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24sysvinit: remove bashism to be compatible with dashFedor Ross
Replace the equality operator '==' with '=' inside of '[]' to be compatible with bash and dash. Signed-off-by: Fedor Ross <fedor.ross@ifm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-13sysvinit: Remove ${B} assignmentMichael Gloff
The VERSION variable is not set unless the top level Makefile is used as the version is derived from the Changelog. If VERSION is not set, none of the binaries built in the sysvinit recipe will have a valid version output. Before: INIT: version booting After: INIT: version 2.96 booting Using the top level Makefile does not cause any additional builds to occur. Signed-off-by: Michael Gloff <mgloff@emacinc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-02sysvinit rc: Use PSPLASH_FIFO_DIR for progress fifoMichael Gloff
psplash expects the fifo to be in /run or specified by PSPLASH_FIFO_DIR. This patch allows psplash to quit normally. Also, fix the work around of using echo directly into the fifo and use psplash-write. Signed-off-by: Michael Gloff <mgloff@emacinc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-02sysvinit: update 2.96 -> 2.97Alexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-12sysvinit-inittab: Add support for tty devices with 10 or more number.Yuki Hoshino
"start_getty" support for tty devices with under 10 number. When SERIAL_CONSOLES has tty devices with 10 or more number, do not't start getty and output the following message. ---------- sh 1: unknown operand ---------- Signed-off-by: Yuki Hoshino <yuki.hoshino@miraclelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-28sysvinit: remove logsave.8Jeremy Puhlman
logsave is a duplicate from e2fsprogs, which was already removed, but the man page remained which is also a duplicate. However it does not get modifed on install so it conflicts with the e2fsprogs version. Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-28sysvinit: Fix install order/dependencyMark Hatle
It is possible for sysvinit to be installed before the passwd/group files are installed from base-passwd. This results in an warning that the shutdown group can't be found. Adding a dependeny on base-passwd will resolve this issue. This has similar symptoms to the problem that oe-core commit 0227e929021263c51d2e7db36224000fecb01f1c fixed. The fix is simular in that it ensures that base-passwd is installed first, just at runtime vs setscene time. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08sysvinit: Fix Reproducibility issueRichard Purdie
With a sequence like: bitbake sysvinit bitbake sysvinit -c clean bitbake sysvinit -c package_write_ipk -f then the resulting package has two files with group "root/70" rather than "root/shutdown". The issue is that of do_package is a setscene task, base-passwd isn't present. This patch fixes that dependency but there may be other cases of this problem around. [YOCTO #13776] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-09sysvinit: update 2.88dsf -> 2.96Alexander Kanavin
Remove 0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch, the problem has been fixed upstream. Rebase the other patches. License-Update: copyright years Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-21distro_features_check: expand with MACHINE_FEATURES and COMBINED_FEATURES, ↵Denys Dmytriyenko
rename Besides checking DISTRO_FEATURES for required or conflicting features, being able to check MACHINE_FEATURES and/or COMBINED_FEATURES may also be useful at times. Temporarily support the old class name with a warning about future deprecation. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-22sysvinit: Include sys/sysmacros.h for major/minor definitions on musl tooKhem Raj
Fixes musl issue implicit declaration of function 'minor' is invalid in C99 [-Wimplicit-function-declaration] which eventually ends up with a linker error Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-30busybox-inittab/sysvinit-inittab: add rconflictsChangqing Li
when both installed, do_rootfs report error like: file /etc/inittab conflicts between attempted installs of busybox-inittab-1.30.1-r0.qemux86 and sysvinit-inittab-2.88dsf-r10.qemux86 so add each other to rconflicts Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-26sysvinit: consolidate patchesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-12sysvinit-inittab: support non-busybox-getty on serial consolesAndré Draszik
Busybox' getty has code to try to make itself a session leader, whereas util-linux' agetty doesn't. It expects this to happen from outside. When getty is not a session leader, many things don't work on the serial console, e.g. setting the terminal process group, job control doesn't work, etc. Executing image tests also fails with AssertionErrors, because Feb 5 16:12:55 qemuarm getty[590]: /dev/ttyAMA1: cannot get controlling tty: Operation not permitted Feb 5 16:12:55 qemuarm getty[590]: /dev/ttyAMA1: cannot set process group: Inappropriate ioctl for device Update the start_getty script to invoke getty via the setsid utility if needed, i.e. if /sbin/getty is not busybox getty. [YOCTO #13058] Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06meta: Use double colon for chown OWNER:GROUPKosta Zertsekel
Rationale - excerp from `info chown` ==================================== OWNER‘:’GROUP If the OWNER is followed by a colon and a GROUP (a group name or numeric group ID), with no spaces between them, the group ownership of the files is changed as well (to GROUP). Some older scripts may still use ‘.’ in place of the ‘:’ separator. POSIX 1003.1-2001 (*note Standards conformance::) does not require support for that, but for backward compatibility GNU ‘chown’ supports ‘.’ so long as no ambiguity results. New scripts should avoid the use of ‘.’ because it is not portable, and because it has undesirable results if the entire OWNER‘.’GROUP happens to identify a user whose name contains ‘.’. Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14sysvinit: Fix build with glibc 2.28 + libxcryptKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-15sysvinit-inittab: do not use 'exit 1' to postpone to first bootAlexander Kanavin
Instead, first check if we need to do anything at all during first boot, and if so, either postpone to first boot via pkg_postinst_ontarget() when running on host, or run the necessary setup code when running on target. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-04sysvinit: inherit distro_features_checkRobert Yang
Use distro_features_check so that we can have a uniform controller. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-02initscripts: don't use update-alternativesMarkus Lehtonen
Stop using update-alternatives for managing /etc/init.d/functions. Also, make the initscripts-functions subpackage to (runtime) conflict with lsbinitscripts. [YOCTO #10944] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2017-09-21sysvinit-inittab: start_getty: Cleanup commentsAndrea Adami
Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-21sysvinit-inittab: start_getty: consider whitespaces in tty driver nameAndrea Adami
Unbreak serial console when driver name contains spaces (PXA serial). Fix commit ac0e954 "start_getty: Over added SERIAL_CONSOLE cause error in userspace log" Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-03start_getty: Over added SERIAL_CONSOLE cause error in userspace logChoong YinThong
Error log will be logged into /var/log/message. Added in more condition checking on the script. Check /proc/tty/drivers and /proc/tty/driver/* file system to retrieve active targeted serial. Only establish getty with active serial in runtime. [YOCTO #10844] Reviewed-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Choong YinThong <yin.thong.choong@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16sysvinit-inittab: fix getty device removalLeonardo Sandoval
getty devices were not being removed in some cases because device name was not at the end of the line, for example a ttyS1 device: S1:12345:respawn:/bin/start_getty 115200 ttyS1 vt102 Removing this limitation allows sed to remove any line containing the device. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-11-23sysvinit-inittab: make TERM=vt102 on serial consolesAndré Draszik
This makes more sense than the default TERM=linux (as set by the linux kernel). In addition, when using busybox init, it tries to achieve the same (in a different way). Both agetty, and busybox getty support the terminal type as the last argument. Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-10sysvinit-inittab_2.88dsf.bb: Allow aliasing with SERIAL_CONSOLES_CHECKCalifornia Sullivan
With some hardware the name of the device node and the name in /proc/console differ. This causes SERIAL_CONSOLES_CHECK to not enable working consoles in these cases. This patch changes SERIAL_CONSOLES_CHECK to have an optional alias for the checked consoles. The new format is: <device>:<alias to check(optional)> Fixes [YOCTO #9440]. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>