summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts
Commit message (Collapse)AuthorAgeFilesLines
* recipes: Update S = WORKDIR recipes to use ${S} correctlyRichard Purdie10 days1-29/+29
| | | | | | | | | | Where recipes use S = ${WORKDIR}, ensure they are referencing ${S} correctly to access files as soon we want to stop doing this in WORKDIR at which point they would break unless corrected. (From OE-Core rev: f25dd633fffe6560f191526d1869e657e129bad9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Add custom mount args for /var/libColin McAllister2024-02-022-2/+4
| | | | | | | | | | | Adds bitbake variable to set additional mount flags for the /var/lib overlayfs or bind mount when using a read-only root filesystem. This can be used to set additional options like "-o nodev". (From OE-Core rev: c3109e40e2c2c881996dd3fcc95fca74f098646d) Signed-off-by: Colin McAllister <colin.mcallister@garmin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: upgrade 1.65.2 -> 1.66Wang Mingyu2023-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Changelog: ========== * d/init.lintian-overrides: Silence warning about "Important" field 'Important: yes' instructs APT to warn the user before removing this package. * script/update-rc.d: DPKG_ROOT support for sysvinit * Add "Protected: yes" to package "init" The "Protected" field does the same as "Important" already did in apt, but is also understood by dpkg (since dpkg 1.20.1). * Bump Standards-Version to 4.6.2, no changes * Override Lintian warning for Protected: yes * deb-systemd-invoke: support reload/reexec. This is useful for the --user case, to provide a shortcut that loops over all active user sessions over D-Bus. * deb-systemd-invoke: support --no-dbus for reload/reexec. Provide common implementation for SIGHUP/SIGRTMIN+25 to reload/reexec the system or user instances. (From OE-Core rev: 1d3af466f58dc1e5299c55f7ad6179128da3a553) Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes: Drop remaining PR values from recipesRichard Purdie2023-09-221-1/+0
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: d4c346e8ab8f3cae25d1b01c7331ed9f6d4f96ef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* VOLATILE_TMP_DIR: addTrevor Woerner2023-02-281-0/+3
| | | | | | | | | | | | | Provide a mechanism to allow users to choose whether the /tmp directory is on persistent storage (non-volatile) or a RAM-based tmpfs (volatile). The default is volatile. Works for both sysvinit-based and systemd-based systems. (From OE-Core rev: 8b76c0637eaeaf5bd5e696680cd74b7a642f4157) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: upgrade 1.64 -> 1.65.2wangmy2022-10-261-1/+1
| | | | | | | | (From OE-Core rev: d8bfff1b18ea7c406d6e251f9ef1090a2c8802fb) Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: exclude experimental tags from version checkAlexander Kanavin2022-09-171-0/+1
| | | | | | | (From OE-Core rev: d70776fcbb0c426096061d1d8e8d47fd2ac73107) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: run umountnfs as a KILL scriptShruthi Ravichandran2022-07-231-1/+1
| | | | | | | | | | | | | | | | | `rc` runs all the KILL scripts in a runlevel before the START scripts. The umountnfs script is currently configured as a START script, and runs after the networking KILL script. During shutdown, this causes a ~3 minute timeout after networking is shutdown when the system tries to connect to and unmount any mounted network shares. Fix this by changing the script configuration to "stop" so that it can run before networking is stopped and unmount any network shares safely. (From OE-Core rev: c419bd4537756e9f6c2fe6da3a9b798526e27eca) Signed-off-by: Shruthi Ravichandran <shruthi.ravichandran@ni.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: upgrade 1.63 -> 1.64wangmy2022-07-121-2/+2
| | | | | | | | | | | | | | | | License-Update: year updated to 2022 Changelog: ========= * Team upload. * d-s-h: break infinite recursion on symlinks. (Closes: #1014119) * Bump Standards-Version to 4.6.1, no changes * Update date ranges in d/copyright (From OE-Core rev: 267521e66560f214d3b037a7c268c26699d84988) Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: upgrade 1.62 -> 1.63wangmy2022-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changelog: ========== * Remove constraints unnecessary since buster * init-system-helpers: Drop versioned constraint on perl-base in Depends. * init: Drop versioned constraint on init-system-helpers in Depends. * t/helpers.pm: use installed version of deb-systemd-helper if TEST_INSTALLED is set * add DPKG_ROOT support (Closes: #983421) * Add additional error checking on write operations. The 'close()' call can fail on both read and write - while the read is usually relatively benign, for the write counter part can include "fun" errors. Most of these would most likely be persistent issues, but it makes sense to detect errors as early possible. * service: use 'grep -F' instead of 'egrep' 'egrep' and 'fgrep' have been deprecated in GNU grep since 2007, and in current post 3.7 Git they have been made to emit obsolescence warnings. The occurrence in 'service' uses a non-regex argument, so switch to 'grep -F' instead of '-E'. (From OE-Core rev: abf37e040faf510e6e087d97bf76cf07aef05e18) Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Clean up license handling/identifiersRichard Purdie2022-04-0126-349/+94
| | | | | | | | | | | The license is clear, add an SPDX license identification headers to the scripts and drop the weird patch, we don't need it. (From OE-Core rev: 540041ac80cfc91df61b45d48f9c9ebbc9b2e71e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: upgrade 1.60 -> 1.62wangmy2022-02-251-1/+1
| | | | | | | | | | | | | | | | Changelog: ========= * use fakechroot instead of unsharing the mount namespace and mounting tmpfs * deb-systemd-invoke: systemctl --machine @<UID> is now available in v249.10. Adjust the version check accordingly * Skip build-time tests if DEB_BUILD_OPTIONS=nocheck is set * Fix typos found by Lintian * Set Rules-Requires-Root: no (From OE-Core rev: 5ee6558c4364d49a0e003648ac49f58f1fb41765) Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX ↵Richard Purdie2022-02-202-2/+2
| | | | | | | | | | | | | 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. (From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Add explict branch to git SRC_URIsRichard Purdie2021-10-301-1/+1
| | | | | | | | | | | | | There is uncertainty about the default branch name in git going forward. To try and cover the different possible outcomes, add branch names to all git:// and gitsm:// SRC_URI entries. This update was made with the script added to contrib in this patch which aims to help others convert other layers. (From OE-Core rev: b51c405faf6f8c0365f7533bfaf470d79152a463) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-022-17/+17
| | | | | | | | | | | | 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 "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: fix creation order for /var/log with VOLATILE_LOG_DIR=trueMatthias Schiffer2021-07-241-1/+2
| | | | | | | | | | | | Create the /var/log symlink directly after /var/volatile/log, so /var/log is available for the creation of /var/log/wtmp a few lines later. (From OE-Core rev: 64b659b9e40da3280ba8911b4044b19aa7366262) Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: populate-volatile.sh: run create_file synchronouslyMatthias Schiffer2021-07-241-1/+1
| | | | | | | | | | | | | | | | | | | The behavior of running create_file in the background was introduced in d44816bedade ("initscripts: Populate volatile from existing file") without further explanation. Besides its questionable benefit, this causes actual issues: - Not all create_file processes may have finished by the time the initscript exits (or when it moves /etc/volatile.cache.build !) - By making the order of commands nondeterminstic, it could hide dependency issues where it was attempted to create files before their containing directories (From OE-Core rev: 1a4ddb0d3f1289e0b67b6eba9be58374d3d7a80b) Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: populate-volatile.sh: do not log to tty0Matthias Schiffer2021-07-241-4/+4
| | | | | | | | | | | | tty0 may not be the intended console for log messages, or it may not exist at all in kernel configurations without CONFIG_VT. Just use the default stdout/stderr instead. (From OE-Core rev: 669e74d358db59768862515fe584aa1edf6cec04) Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: upgrade 1.58 -> 1.60Alexander Kanavin2020-12-301-1/+1
| | | | | | | (From OE-Core rev: 3ae7b7f72d4b55d66e6f8f8a9bc71e14fb826c47) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Use initctl on sysvinit onlyKhem Raj2020-12-201-8/+14
| | | | | | | | | | | Check if init system is sysvinit to recreate initctl, this ensures that it can be used with busybox init system as well (From OE-Core rev: 15c467d0206ee30fe708f76b7d5e0033ab687475) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Sinan Kaya <okaya@kernel.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: use quotes for shell variable comparisionKhem Raj2020-12-201-1/+1
| | | | | | | | | Helps to execute it with busybox shell (From OE-Core rev: 45ba0ca0352bca46f974d28781ac935d8e9ec3ea) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Change execution order between checkroot and modutilsDiego Sueiro2020-12-061-1/+1
| | | | | | | | | | | | | | When '/' is first mounted as read-only, we want to have the checkroot.sh initscript (which then remounts '/' as rw if allowed) running before the modutils.sh. This is because modutils.sh initscript might need to run depmod depending on the status of the modules.dep file to update it and the '/' needs to be writable. (From OE-Core rev: 39f16d7dc42dcfe4a3fcceb8e476ac3c1e0ba3a2) Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Fix populate-volatile.sh bug when file/dir existsAndrei Gherzan2020-07-271-12/+12
| | | | | | | | | | | | | | | The blocks which test for entry exitence (file or directory) use a `A && B || C` syntax. This form is not behaving as a if-then-else block even the code logic assumes that. C may run when A is true which breaks the case where VERBOSE is 'no' but the file/directory exists. Along with fixing these specific issues, this patch fixes the other instances where blocks of form `A && B || C` are used as if-then-else. (From OE-Core rev: 1b9ea22acb66554925720e04cf24100664234574) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Fix various shellcheck warnings in populate-volatile.shAndrei Gherzan2020-07-271-29/+29
| | | | | | | (From OE-Core rev: 0a128a238f63d52aa82f8c63ee2f84ab528b3346) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: upgrade 1.57 -> 1.58Richard Purdie2020-07-181-1/+1
| | | | | | (From OE-Core rev: fd0cae10e4b769d80b036ed2325965bdd30d7e09) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: update postinstChangqing Li2020-06-301-1/+1
| | | | | | | | | | | | | | in container image, it don't have init system, install package initscripts will report error: systemctl: command not found fix by use same way as systemd.bbclass to decide if systemctl mask will run (From OE-Core rev: 790276bde066ecc9876120c3097dcd57a9936f00) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: use https for fetchingAlexander Kanavin2020-06-091-1/+1
| | | | | | | | | git:// protocol seems to be down. (From OE-Core rev: 97da539d49de979c9a303a5ecda09515d188673e) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-system-helpers: avoid superfluous update-rc.dJens Rehsack2020-06-041-7/+2
| | | | | | | | | | | | | Debians init-system-helpers bundle an own, perl written update-rc.d which doesn't fulfill embedded/cross-build requirements as our own in meta/recipes-core/update-rc.d does. To avoid unnecessary conflicts or questions, do not bundle it by default. Whoever wants it is invited to have an .bbappend. (From OE-Core rev: 4e5a55c7ecf7100bb87dcad31723ee27b7006ac2) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts/init-system-helpers: fix mountnfs.sh dependencyJens Rehsack2020-06-042-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | With commit c9fc9110be33fe0f24bc3a7c242b584a4ca33e04 Author: Yue Tao <Yue.Tao@windriver.com> Date: Fri May 25 10:48:08 2018 +0800 initscripts: Avoid starting rpcbind daemon twice Check the status before start it to avoid duplicates. the use of a script {/usr/sbin/}service is introduced - maybe earlier provided by systemd, nowadays mostly by init-system-helpers from debian project. For the very first shot, maybe discussions and improvements based on that script collection, use just the init-system-helpers-service in initscripts/mountnfs.sh to avoid problems mounting NFS in later boot stage. (From OE-Core rev: db690c3bf4664ce71fc21650fbcd8b6ac2eb71f1) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts/sysfs.sh: Mount /sys/firmware/efi/efivars when possibleHaris Okanovic2019-11-101-0/+4
| | | | | | | | | | | | | Without this change, efibootmgr is unable to recover BootOrder if lost during a previous write operation, e.g. exceeded storage capacity. This is problematic using EFI to manage boot flow from Linux (E.g. via RAUC). https://www.kernel.org/doc/Documentation/filesystems/efivarfs.txt (From OE-Core rev: 0fb92b500b7d6b84368ca3a85e675400c6473987) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: enable alignment.sh init script for big endian ARMAndre McCurdy2019-09-182-0/+1
| | | | | | | (From OE-Core rev: 2e00755bf231f1de5ab96ee5de0859cb0930d544) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: remove warnings on read-only-rootfs (again)Martin Hundebøll2019-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the populate-volatile.sh initscript tests if a configured symlink is already in place, it uses readlink with the '-f' (follow) option: > [ "$(readlink -f $source)" = "$dest" ] If the test fails, it proceeds to delete the exisiting folder/file, and create the configured symlink. However, the '-f' option to readlink makes it follow symlinks pointing at symlinks. If the $dest argument is a symlink, the above test fails, and warnings are printed due to changing a read-only rootfs. This is the case for /tmp, and /etc/resolv.conf: > /tmp -> /var/tmp -> /var/volatile/tmp > /etc/resolv.conf -> /var/run/resolv.conf -> /run/resolv.conf Fix the warnings by removing the '-f' option, so that the test matches the configuration. [ YOCTO #10814 ] (From OE-Core rev: fb028a0a25c02ab56ad262afd8e6e9495a44673d) Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Add support for /etc/default/timestampJeroen Hofstee via Openembedded-core2019-03-042-3/+10
| | | | | | | | | | | Source /etc/default/timestamp if present. This allows the rootfs to be read-only / store the file in a persistant location if the whole rootfs is updated. (From OE-Core rev: b4de37b7176630d9585b12c50d537cd561c7aeb9) Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Update volatiles documentation to include bindsJoshua Watt2019-02-191-1/+1
| | | | | | | | | | Volatiles processing now handles bind mounts, so update the comment in the core file to indicate this. (From OE-Core rev: 520e8f5721aab90815186533038c2f9f834546d5) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Use double colon for chown OWNER:GROUPKosta Zertsekel2018-11-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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 ‘.’. (From OE-Core rev: 185918234a07cb506d7d7464a49ac33972c7d963) 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>
* initscripts: populate-volatiles: Speed up processingJoshua Watt2018-10-141-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | Checking the requirements for each volatiles file in the populate-volatiles script can be very slow when there are a large number of volatiles files, easily consuming over 80% of the processing time. These checks don't usually uncover any problems so concatenate all the volatiles files together and process them as one large file for a "fast path" option. This ensures that the penalty for checking the requirements is only incurred once. In the event that checking the requirements for the unified file fails, fall back to the slow process of checking each one individually so that the offending one can be skipped. The core file is handled separately because it is responsible for creating the temp directory used by check_requirements and thus must always run first and without having its requirements checked. [YOCTO #12949] (From OE-Core rev: f380fac8a43a75861f3157777b12a317b985a5e1) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: read-only-rootfs-hook: Use overlay if availableJoshua Watt2018-10-121-2/+7
| | | | | | | | | | | | Copying files from the read-only /var/lib to tmpfs can be slow and waste memory. If the kernel supports the overlay file system, use it to mount a writable tmpfs on top of the read-only /var/lib and avoid the file copy. (From OE-Core rev: 370fda1b2e8d5dc011522131bba4106de26bfb19) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Avoid starting rpcbind daemon twiceYue Tao2018-05-291-3/+6
| | | | | | | | | | | Check the status before start it to avoid duplicates. (From OE-Core rev: ca3ef7d1ef9b1f0dc4d3170b1ad20d5f725872a1) Signed-off-by: Yue Tao <Yue.Tao@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: rrecommend initscripts-functionsMarkus Lehtonen2017-12-021-0/+2
| | | | | | | | | | | In order to make that the default provider for initd-functions. [YOCTO #10944] (From OE-Core rev: d32eaebed5726c6157a2ac993baeb6d16683ade7) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: don't use update-alternativesMarkus Lehtonen2017-12-021-6/+3
| | | | | | | | | | | | | Stop using update-alternatives for managing /etc/init.d/functions. Also, make the initscripts-functions subpackage to (runtime) conflict with lsbinitscripts. [YOCTO #10944] (From OE-Core rev: cdcebd81c872cb7386c658998e27cf24e1d0447c) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Add HOMEPAGE info into recipe file.Huang Qiyu2017-09-211-0/+1
| | | | | | | | (From OE-Core rev: 19f4e69c81653a4fa197fba2c46e48fcd554a12e) Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: split sushell into sub packageJackie Huang2017-08-231-2/+3
| | | | | | | | | | | | | | | | | | | * sushell is required by systemd service debug-shell when selinux is enabled, but it doesn't make sense to make systemd depend on initscripts, so split sushell into sub package initscripts-sushell. * The bash dependency has been removed by: ''' 4917e36a77bd6821b45db52caa43939d344d92f6 initscripts: Fix regression for requiring /bin/bash ''' so remove bash from RDEPENDS when selinux is enabled. (From OE-Core rev: 9c84ca86f396886ae68774032724b53664ecf0ed) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: support persistent /var/logChen Qi2017-08-182-1/+3
| | | | | | | | | | | | Respect VOLATILE_VAR_LOG variable so that if it's set to any valid boolean false value, we could have persistent /var/log on the final image. [YOCTO #6132] (From OE-Core rev: 50914c4a84e0fb6b9bf6bb1864a2d653218753ce) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: start bootmisc.sh at 36 instead of 55David Vincent2017-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | bootmisc.sh is responsible for setting the system date to a sane default. Currently, it is the last script to be run from the rcS runlevel. Problem is that the files created before appear to have been created on 1/1/1970. Most notably, /var/log/dmesg created in dmesg.sh cannot be properly rotated with logrotate which does not consider it a valid date and stops processing. There is no blocker on moving this script right before populating volatiles because it just requires the local and virtual filesystems to be mounted to work. (From OE-Core rev: a0f6508847a28a78cb0a1e9613b6e5cc3047d995) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Populate volatile from existing fileDavid Vincent2017-06-061-2/+14
| | | | | | | | | | | | | | | In some cases, it may be useful to populate a volatile file from an existing one, e.g. a file in a read-only rootfs that may be edited in a read-write destination. To provide this behavior, creation of volatile files has been updated to copy a file which has been given in the <linksource> field. If set to none, the current behavior is preserved. (From OE-Core rev: d44816bedadeef420226dc5efb67065cfcda6634) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts/sysfs.sh: mount configfs if presentMike Looijmans2017-03-011-0/+4
| | | | | | | | | | | | configfs is another kernel virtual file system that should be mounted if configured, so if it's configured into the kernel, mount it. It is used to configure e.g. USB gadget mode and devicetree overlays. (From OE-Core rev: 4f52130475d026c32f0380d301f56f6fa3df7ac9) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: Add PACKAGE_WRITE_DEPS for postinstRichard Purdie2017-01-201-1/+1
| | | | | | | | The postinstall needs systemd-systemctl-native, mark the dependency (From OE-Core rev: 853f05b4d81c9af0fe1050cd15f13b8d3f9a93a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: populate-volatile: suppress read-only-rootfs warningsAndré Draszik2016-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | rm: can't remove '/etc/resolv.conf': Read-only file system ln: /etc/resolv.conf: File exists /etc/default/volatiles contains an entry: l root root 0644 /etc/resolv.conf /var/run/resolv.conf which causes populate-volatile.sh to execute the following in link_file(): if [ -L \"$2\" ]; then [ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; }; elif [ -d \"$2\" ]; then ... At the time the image is created, /etc/resolv.conf is already a symlink to /var/run/resolv.conf, but at boot time when populate-volatiles.sh is run, /var/run/resolv.conf doesn't exist, causing it to try to rm -f and ln -sf which of course fails due to the read-only filesystem. [YOCTO #10814] (From OE-Core rev: 765ee275f5499254b1f09e394c757072bea5f459) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: populate-volatile: don't run commands in backgroundMans Rullgard2016-12-221-3/+3
| | | | | | | | | | | If commands are run asynchronously they may be completed out of order causing problems if later entries depend on earlier ones. (From OE-Core rev: bead9e59768209dd70f9cba51d2f1e5925cc284d) Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initscripts: populate-volatile: improve config file parsingMans Rullgard2016-12-132-5/+7
| | | | | | | | | | | This improves the config file parsing to permit blank lines and comments following an entry or preceeded by whitespace. (From OE-Core rev: 415eaacb83b1c6df5210fb423e3e96e530b1dc42) Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>