Commit Graph

98 Commits

Author SHA1 Message Date
Mike Looijmans abda45bb2a initscripts/sysfs.sh: mount configfs if present
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>
2017-03-01 23:27:08 +00:00
Richard Purdie d4f69f40ac initscripts: Add PACKAGE_WRITE_DEPS for postinst
The postinstall needs systemd-systemctl-native, mark the dependency

(From OE-Core rev: 853f05b4d81c9af0fe1050cd15f13b8d3f9a93a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-20 11:53:50 +00:00
André Draszik d8c62f19da initscripts: populate-volatile: suppress read-only-rootfs warnings
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>
2016-12-22 08:50:17 +00:00
Mans Rullgard 1fac14dd8f initscripts: populate-volatile: don't run commands in background
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>
2016-12-22 08:50:16 +00:00
Mans Rullgard 438d123051 initscripts: populate-volatile: improve config file parsing
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>
2016-12-13 22:55:19 +00:00
Mike Looijmans ea1d3ff7b5 initscripts: Start devpts at 06 instead of 38
For example bootlogd needs devpts to be running, but bootlogd starts
at 07. Starting bootlogd early makes perfect sense, so the best option
here is to move devpts up to 06 to prevent this error message at boot:
cannot allocate pseudo tty: No such file or directory

Systems that have CONFIG_LEGACY_PTYS in the kernel will not see this
message. Since it is called "LEGACY" for a reason, fixing this in
userspace appears to be the better option here.

The devpts script does not need anything except a mounted "/dev" which
has been arranged in "S02sysfs.sh" already.

(From OE-Core rev: 4cb06256e0d13f3f5d0b280853b900d7d342b7f2)

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03 23:45:53 +01:00
Ovidiu Vancea 0d445840c4 initscripts: Check for logrotate in dmesg.sh
Autodetect previously hardcoded logrotate location because it can be
installed in multiple places like /usr/bin/logrotate which is very
common besides /usr/sbin

(From OE-Core rev: 277a5975d43125623b5a51ddcb48f9ee2474d0fc)

Signed-off-by: Ovidiu Vancea <ovidiu.vancea@ni.com>
Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-23 17:44:35 +01:00
Ming Liu f053b5fac3 initscripts: check if swapon/swapoff exists before executing them
Not all built images contain swapon/swapoff, for instance, it is
configurable with or without them in busybox. So it'd better to check if
they exist or not before executing them.

Redirecting the potential errors to /dev/null is not good enough, which
might suppress the *real* errors.

(From OE-Core rev: 2cb1142710cc2beb762c4c2b8edd44d3a97dafa0)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-30 15:58:15 +01:00
Jens Rehsack f6b39575fb initscripts: start urandom after populate-volatiles
In case of read-only rootfs, populoate-volatiles might be used to create
some links (or bind-mounts) required for having a writable /var/lib.

(From OE-Core rev: 1f07dcfcecbd42f947b83c6f75d1a66186bcad68)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-14 11:42:19 +00:00
Jens Rehsack 85ac8eb473 initscripts: populate-volatiles.sh: add mount-bind feature
Add ability to run "mount --bind" to populate-volatiles. Since several
programs use realpath to determine several full qualified file names,
there is no symlink to be resolved. So when speccing /run/lock - that's
the location - not /var/run/lock because of the program is smarter
than the operator/distributor.

See https://github.com/rehsack/meta-jens/blob/jethro/recipes-core/initscripts/initscripts/volatiles
for an example how to use the "b" feature.

(From OE-Core rev: ab42fcaf1427a29c31ac2e93965e20849b1b1234)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-14 11:42:19 +00:00
Ming Liu 2ba954fcb2 initscripts: hide the error in case system is not writeable
To avoid reporting errors for /etc/timestamp is not writeable in a
readonly system.

Reported-by: Niklas Soderlund <niklas.soderlund@external.atlascopco.com>
(From OE-Core rev: 463bef8b055f8305b7aac5045fefe4276b1432ad)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:10 +00:00
Mike Looijmans c509c781eb initscripts/sysfs.sh: Mount devtmpfs on /dev/ if needed
When booting from an initrd disk, or when the kernel config option
DEVTMPFS_MOUNT isn't provided, /dev/ will not be mounted at boot.

This small addition will check if /dev/ is "useful", and if not, will
mount devtmpfs if the kernel provides it.

With this change, it is possible to set an initscripts style image type
to "cpio.gz" and boot it as initrd. Without this change, the image won't
work properly because of the missing devices.

(From OE-Core rev: a1cfb8a2691ed36700c96cbc1a0e744494294d2b)

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>
2015-10-27 07:24:27 +00:00
Jason Wessel 38d5255690 initscripts: Fix regression for requiring /bin/bash
It is not possible to create a rootfs with only busybox + initscipts.
This is a result of a regression from commit
a4b53872a8a9a2743299acbff015f7f2750a69d6 (initscripts: add
/sbin/sushell for systemd service debug-shell).

The /sbin/sushell should just use /bin/sh else you end up with a
problem when creating the end image with a failed smart transaction
shown below:

ERROR: Unable to install packages. Command '/proj/bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/smart --quiet --data-dir=/proj/bitbake_build/tmp/work/qemuarma9-wrs-linux-gnueabi/wrlinux-image-glibc-small/1.0-r1/rootfs/var/lib/smart install -y dropbear@armv7at2_vfp hac@armv7at2_vfp run-postinsts@all kernel-modules@qemuarma9 packagegroup-core-boot@qemuarma9' returned 1:
error: Can't install initscripts-1.0-r155.0@armv7at2_vfp: no package provides /bin/bash

(From OE-Core rev: 4917e36a77bd6821b45db52caa43939d344d92f6)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 12:40:24 -07:00
André Draszik 1ce5d59f9e initscripts: urandom: respect ${localstatedir} instead of hardcoding /var
(From OE-Core rev: 5f3f4196988675e9be5aea8eac56687641b90c10)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-31 10:32:38 +01:00
Kai Kang fbe51e01f9 initscripts: add /sbin/sushell for systemd service debug-shell
Add file /sbin/sushell for systemd service debug-shell which starts with
/bin/sushell when SELinux is enabled. Copy and add sushell file from
Fedora 22.

Add runtime dependency bash as well when systemd is enabled to eliminate
QA warning:

WARNING: QA Issue: /sbin/sushell_initscripts contained in package initscripts
requires /bin/bash, but no providers found in its RDEPENDS [file-rdeps]

(From OE-Core rev: a4b53872a8a9a2743299acbff015f7f2750a69d6)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:20 +01:00
Bryan Evenson 167025e6d7 initscripts: Remove /etc/volatile.cache on upgrade
/etc/volatile.cache is a cached copy of a script (which is
generated by /etc/init.d/populate-volatile.sh) that generates
the volatile filesystem directories.  Since volatile.cache is
a generated file, it is not necessarily changed if
populate-volatile.sh is updated.  As a result, the stale script
can add/remove the wrong directories on the next system boot.

If initscripts is being upgraded, make sure volatile.cache gets
deleted.

(From OE-Core rev: 317269b4a5c698e30b87bd597b436283512cbde9)

Signed-off-by: Bryan Evenson <bevenson@melinkcorp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-20 15:03:07 +01:00
Petter Mabäcker 4eb3db9a2c meta: set proper S value
After removal of auto-creating S we must ensure that all recipes are
using a proper value for S.

Fix all recipes that only need to set S equals to WORKDIR.

[YOCTO #5627]

(From OE-Core rev: 9d220b1bfe4589736604dd5a7129e3699377d830)

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:36:27 +00:00
Jian Liu b4f4d0f804 initscripts: avoid overwritting editable files during package updating
Use CONFFILES to mark editable files as such,
  /etc/init.d/checkroot.sh

If there is no %config micro before the file name in the spec file,
this file will be overwritten after updating package.
This will make our settings lost.

(From OE-Core rev: a265af666a80298ccca0eb80d6f15ca3d4be8b57)

Signed-off-by: Jian Liu <jian.liu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:23:59 +00:00
Chen Qi 3b00803dd1 initscripts: mask several init scripts
We now support executing scripts under /etc/rcS.d. So we need to
mask several more init scripts here to prevent them from running
at boot time.

(From OE-Core rev: c8f9527f18e5dd813c0330ba409875d34c36f6ab)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-03 11:09:06 +01:00
Ben Shelton 7c11b327a1 initscripts: fix bashism in bootmisc.sh
In the commit 'initscripts: save /etc/timestamp with seconds accuracy',
a bashism was introduced in the bootmisc.sh script in the code to set
the current date from the stored value in /etc/timestamp.  This causes
that operation to fail with the following message when /bin/sh is not
bash:

/etc/init.d/rc: /etc/rcS.d/S55bootmisc.sh: line 73: syntax error: bad substitution

Fixed by using pattern matching removal rather than bash-specific
substring expansion.

[YOCTO #6566]

(From OE-Core rev: c8a451adc71e4ce9ab963f61d7830c2d75aaffca)

Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 21:59:17 +01:00
Richard Tollerton b163ba19de initscripts: Add support for /etc/default/urandom
Source /etc/default/urandom if present.  This allows the rootfs to
remain read-only while enabling the user to override the location of the
random seed file.

(From OE-Core rev: 415e1a4ac8120b28118671698459b098c965a4f6)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:09:00 +01:00
Richard Tollerton 0327db6b07 initscripts: make hostname.sh coreutils-compatible
inetutils and busybox hostname utils support `hostname -F`; coreutils
hostname doesn't. So just use `cat` instead.

(From OE-Core rev: acb8674e498468088d867ffae9a458caa08d95d5)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:08:59 +01:00
Ken Sharp 82ef864f19 initscripts: Use current date as an additional source of entropy
If the seed file is empty or does not exist, the date is an extremely
poor backup source of entropy, but it is better than nothing.

(From OE-Core rev: 0a41a7c20316c7d3330233a624d8cf20ea5a81ae)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:08:59 +01:00
Richard Tollerton 769b0f3018 initscripts: parametrize random seed file location
Currently, the random seed file location is hardcoded to
/var/lib/urandom/random-seed.  Refactor it to a parameter
(RANDOM_SEED_FILE) so the file location is defined in only one place.

(From OE-Core rev: 558ba23cfdd60bf64b9214460a2772be70079796)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:08:59 +01:00
Blair Elliott 00017b4dd8 initscripts: save /etc/timestamp with seconds accuracy
Currently, /etc/timestamp is saved with minutes accuracy.  To increase
the accuracy, modify the save-rtc.sh and bootmisc.sh scripts to save and
read /etc/timestamp respectively with seconds accuracy.

(From OE-Core rev: 8fed53e4e72230c61f23cb36eda36c228aede1e0)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:08:59 +01:00
Richard Tollerton b573ae8011 initscripts: bootmisc.sh: Make sysctl -p honor VERBOSE
busybox sysctl may lack the "-q" setting, so simulate it with redirects.

(From OE-Core rev: 5672b5188557b940340bdc3e6a3ac30835b829fb)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-19 00:08:59 +01:00
Kai Kang d0f01d8a21 initscripts: update populate-volatile.sh
If a partition such as /tmp mounted on a volatile directory which create
by script populate-volatile.sh from initscripts, it will show errors.

In /var/log/boot, error message:

Thu Jun 19 05:39:09 2014: bootlogd.
Thu Jun 19 05:39:10 2014: rm: cannot remove '/tmp': Device or resource busy

Check volatile directories and if it is be mounted then don't force make
it as a link.

(From OE-Core rev: cc4b0936c7a6a1563dc88d62d8c9020791eaa446)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-24 19:54:11 +01:00
Matthieu Crapet c6a5e6cb52 initscripts: avoid pipe with sed
Small optimisation in /etc/init.d/populate-volatile.sh.

Replace:
cat <file> | sed -e xxx
By:
sed -e xxx <file>

(From OE-Core rev: c91739cd08ed5451a0927586a14db54c4c328ad7)

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-08 13:00:33 +01:00
Richard Purdie 6c931b4ea2 initscripts: Fix PR reversal
(From OE-Core rev: 343f1c49ed223cd188287d4815f9dd956376c94d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25 17:19:20 +01:00
Otavio Salvador 4c14b09498 Globally replace 'base_contains' calls with 'bb.utils.contains'
The base_contains is kept as a compatibility method and we ought to
not use it in OE-Core so we can remove it from base metadata in
future.

(From OE-Core rev: d83b16dbf0862be387f84228710cb165c6d2b03b)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-25 17:19:19 +01:00
Mike Looijmans e45da211a7 PR bumps to remove PRINC use in meta-openpli
Resolves warnings of this kind in the OpenPLi layer:
 WARNING: Use of PRINC * was detected in the recipe *

(From OE-Core rev: 5ffb38d6ace7faae839c8cac7327b5b1c2daae1a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-24 17:55:14 +01:00
Martin Jansa a01af02025 recipes: bump PRs
* resolves following warnings:
  WARNING: Use of PRINC 17 was detected in the recipe meta-openembedded/meta-systemd/recipes-core/systemd/systemd-machine-units_1.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_0.12.10.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-gpe/recipes-support/fbreader/fbreader_git.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-multimedia/recipes-multimedia/sox/sox_14.4.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe meta-openembedded/meta-oe/recipes-multimedia/mplayer/mplayer-common.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe meta-smartphone/meta-android/recipes-bsp/chroot-script/chroot-script_1.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-connectivity/bind/bind_9.8.1.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-core/systemd/systemd-serialgetty.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/screen/screen_4.0.3.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-extended/shadow/shadow_4.1.4.3.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb (or one of its .bbappends)
  WARNING: Use of PRINC 1 was detected in the recipe openembedded-core/meta/recipes-support/libcap/libcap_2.22.bb (or one of its .bbappends)
  WARNING: Use of PRINC 11 was detected in the recipe openembedded-core/meta/recipes-bsp/keymaps/keymaps_1.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 11 was detected in the recipe openembedded-core/meta/recipes-core/systemd/systemd-compat-units.bb (or one of its .bbappends)
  WARNING: Use of PRINC 12 was detected in the recipe openembedded-core/meta/recipes-core/initscripts/initscripts_1.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 13 was detected in the recipe openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb (or one of its .bbappends)
  WARNING: Use of PRINC 2 was detected in the recipe meta-openembedded/meta-oe/recipes-navigation/navit/navit_svn.bb (or one of its .bbappends)
  WARNING: Use of PRINC 2 was detected in the recipe meta-openembedded/meta-oe/recipes-support/lvm2/lvm2_2.02.97.bb (or one of its .bbappends)
  WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-connectivity/portmap/portmap_6.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-extended/pam/libpam_1.1.6.bb (or one of its .bbappends)
  WARNING: Use of PRINC 2 was detected in the recipe openembedded-core/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb (or one of its .bbappends)
  WARNING: Use of PRINC 3 was detected in the recipe meta-openembedded/meta-efl/recipes-efl/efl/entrance_svn.bb (or one of its .bbappends)
  WARNING: Use of PRINC 3 was detected in the recipe meta-openembedded/meta-oe/recipes-multimedia/mplayer/mplayer2_git.bb (or one of its .bbappends)
  WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-bsp/formfactor/formfactor_0.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-connectivity/avahi/avahi_0.6.31.bb (or one of its .bbappends)
  WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-connectivity/dhcp/dhcp_4.2.5-P1.bb (or one of its .bbappends)
  WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 3 was detected in the recipe openembedded-core/meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb (or one of its .bbappends)
  WARNING: Use of PRINC 5 was detected in the recipe meta-openembedded/meta-oe/recipes-core/meta/distro-feed-configs.bb (or one of its .bbappends)
  WARNING: Use of PRINC 5 was detected in the recipe openembedded-core/meta/recipes-connectivity/bluez/bluez4_4.101.bb (or one of its .bbappends)
  WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-core/packagegroups/packagegroup-base.bb (or one of its .bbappends)
  WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-core/packagegroups/packagegroup-core-boot.bb (or one of its .bbappends)
  WARNING: Use of PRINC 6 was detected in the recipe openembedded-core/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb (or one of its .bbappends)
  WARNING: Use of PRINC 7 was detected in the recipe meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.7.bb (or one of its .bbappends)
  WARNING: Use of PRINC 7 was detected in the recipe openembedded-core/meta/recipes-core/udev/udev-extraconf_1.0.bb (or one of its .bbappends)

(From OE-Core rev: c6825ec6e92e20bb64a051d1576f363c16e98d68)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05 17:36:37 +00:00
Chen Qi adc21724d8 initscripts: fix syntax error in postinsts
Fix syntax error in pkg_postinst of initscripts.

(From OE-Core rev: 8240975b937197aee5ab1d651997fe500e8bbd91)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-13 11:41:22 +00:00
Ross Burton 7b317cdd1d initscripts: mask initscripts from systemd
Many of the init scripts in here will do nasty things if systemd decides to run
them.  Mask the obviously bad ones so that systemd won't attempt to invoke them
if initscripts is installed with systemd.

(From OE-Core rev: 844f897710dfee9c59599d09b5c8c906e0d70ac0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11 22:59:38 +00:00
Roy Li 17e6df62d9 initscripts: define failure/success/warning/pass functions
define failure/success/warning/pass functions, some packages' initscript
need them, and /etc/core-lsb/lsb_log_message from lsb needs them too.

(From OE-Core rev: b78154c4a52b5a198e90bca8f83990fe9251fb72)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:52:33 +00:00
Chen Qi acaf650aa4 initscripts: split the functions script into a separate package
Many SysV init scripts need the /etc/init.d/functions script. But
this script is part of the initscripts package. As a result, the
initscripts package should always be installed into the system to
avoid errors when starting daemons. However, it makes no sense to
install the initscripts package into a systemd based image, because
what the init scripts provide has already been provided by the systemd.
On the other hand, the functions script might be still needed in a
systemd based image because other init scripts such as distcc might need
it.

The above situation leads to a natural separation of the functions script
from the initscripts package. And this patch does so. It separates the
functions script into initscripts-functions packages.

(From OE-Core rev: 736dd8380f41d6ff1d3d0e4fe33cc01e2e873ef6)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-06 22:17:28 +00:00
Ross Burton 2b790884c6 initscripts: remove erroneous call to /etc/default/rcS in mountnfs.sh
This doesn't exist when using systemd as it's part of the sysvinit package, and
this script doesn't need it.

(From OE-Core rev: 426a22bb67c7823ee733f8c2bd85421b785c3631)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-24 12:25:34 +00:00
Hans Beckerus fe2574476c initscripts: add missing dmesg.sh to run-level S
In commit faa8cc6c2a582a32c695f3f2b0d45b6892c769fd dmesg.sh was
added to the set of init.d scripts. But the script was never put
in any run-level. This patch will add dmesg.sh to run-level S.

(From OE-Core rev: 7d2767d4e27c6d0eaa56f3e126df56e65a5364c9)

Signed-off-by: Hans Beckerus <hans.beckerus AT gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:03:28 +00:00
Chen Qi dc80eea725 sysvinit: fix problem in switching runlevels
Previously, if we switch to runlevel 1 and then switch back to runlevel
5, the network interface will be brought down and the NFS service will
not be restarted correctly.

The problem is that the networking and rpcbind services are brought down
in runlevel 1 but not brought up in runlevel 5.

This patch fixes the above problem. It's based on the assumption that
in sysvinit-based system, runlevel 1 does not have networking support.

This patch adjusts some init script parameters used by update-rc.d. It
makes sure that networking starts before rpcbind which in turn starts
before mountnfs.sh. When switching to runlevel 0, 1 and 6, the umountnfs.sh
is run first before stopping rpcbind service, and the network is brought
down afterwards.

[YOCTO #5513]

(From OE-Core rev: f12e1291b51ba6692b6809570d6a9b73c70a7fe9)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-20 14:03:23 +00:00
Chen Qi 8a03d595b3 sysvinit: adjust boot sequence and remove hack from udev
Adjust the boot sequence in sysvinit based systems.

The mountall.sh (mounting the local file system) needs to be started
before udev and bootlogd.

This patch makes mountall.sh start before udev and removes the hack of
mounting tmpfs in the udev init script.

This patch also adds some comments to the udev init script to make it
clear why we create the '/var/volatile/tmp' directory.

[YOCTO #5273]

(From OE-Core rev: f6a9df6b7cd411b52e71022b8f7bf8bda6395649)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-08 17:25:36 +00:00
Jeffrey C Honig acd1d3079f initscripts: insure checkroot.sh runs before anything writing to the file
If bootlogd was configured to write to a log file on the root file system,
the checkroot.sh was not able to change the rootfs to read-only because
bootlogd was started earlier and had a file descriptor open.  Lowering
the order of checkroot.sh ensures that the volatile filesystem is set
up before anything writes to it.

(From OE-Core rev: 13c9bc143f6861517970dafdc7e7a45740d0933d)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-18 15:49:56 +01:00
Ming Liu 879ad0532c initscripts: filter out empty lines from volatiles in check_requirements()
So far the rules of check_requirements() is too strict to lead mismatch
when empty lines exist in volatiles.

(From OE-Core rev: 71ab9ee58b0ba5e3f5cbf403d1b8fb79fc7f5ed1)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-10 23:00:50 +01:00
Chen Qi 1dff47b097 read-only-rootfs-hook.sh: check before bind mounting /var/lib
It's possible that /var/lib is on a separate writable partition. In such
situation, we should not bind mount /var/lib with tmpfs, becasue it's
already writable.

This patch fixes this problem by checking whether /var/lib is already
on a writable partition.

[YOCTO #4888]

(From OE-Core rev: 86ac10995fd08226f82d87e23fda5d4898c3190f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 13:19:42 +01:00
Chen Qi e6e44cf9c1 checkroot.sh: check for conflicting configurations
In our current boot scripts, two ways are used to determine whether
the rootfs is read-only or not. One by checking the READ_ONLY_ROOTFS
value in /etc/default/rcS, the other by checking the /etc/fstab entry.

>From a normal Linux user's point of view, the way of checking the
/etc/fstab entry is preferred. However, as there are several boot scripts
that need to know whether rootfs is read-only or not, checking /etc/fstab
in each script brings too much overhead. Thus, these boot scripts
use the READ_ONLY_ROOTFS value in /etc/default/rcS.

In normal use cases, there would be no problem, as both /etc/default/rcS and
the /etc/fstab are modified at rootfs time. However, if the user changes
the mount option for rootfs in /etc/fstab to read-write, and he/she forgets
to change the value in /etc/default/rcS, there would be unexpected results.
For example, the udev-cache would still be disabled.

So at a minimal, a check for conflicting configurations between /etc/fstab
and /etc/default/rcS should be added in checkroot.sh so that there would be
reasonable warnings if users have configured the system in a non-consistent
way.

[YOCTO #4880]

(From OE-Core rev: 1565a0c5a3f245703e280ca90cf11d3f9374788a)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26 13:19:42 +01:00
Chen Qi 005673fc2e initscripts: remove obsolete device_table.txt
device_table.txt was once used by an init script named 'devices' to
create the basic files under /dev. However, it's no longer used now.
The devices init script has been removed, and makedevs command has been
disabled by default in busybox.

Besides, considering the device managers and devtmpfs filesystem, this
file is not likely to be used again. So we remove it.

(From OE-Core rev: cc3842255ade0ad6fb312f06f5e5e1edd9767c94)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-20 15:31:25 +01:00
Chen Qi 4485cd903e populate-volatile.sh: use 'cp -a' to avoid potential problem
Previously, dead links in target directory will not be copied.
This is incorrect as dead links are not uncommon in our rootfs.
So we use '-a' option instead.

(From OE-Core rev: 742440441222e0627abbdd3eb2ee16401e8f4adf)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:14:36 +01:00
Chen Qi 0123eb924d populate-volatile.sh: don't spawn background process at rootfs time
If we're building a read-only rootfs, we'll get the following error now
and then.

    tar: .: file changed as we read it

The root cause is that we spawn background process at rootfs time.
When the tar command is running, it's possible that files under rootfs
are changed by background processes, thus this error.

[YOCTO #4937]

(From OE-Core rev: 4bd419f95868d5b8707a45cee5f6c5c6a840a65b)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:14:35 +01:00
Chen Qi 43c5b5f534 populate-volatile.sh: use $ROOT_DIR/var/volatile/tmp as TMPDIR
It's possible that a 'No such directory' error occurs when doing
check_requirement in populate-volatile.sh at rootfs time. This is
because the $ROOT_DIR/var/tmp might be a dead link.

Use $ROOT_DIR/var/volatile/tmp as the TMPDIR instead to avoid this
error.

[YOCTO #4883]
[YOCTO #4103]

(From OE-Core rev: 7c2c36a97bab46c73a3a1fb743ad3ec67a4c072e)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-16 11:14:35 +01:00
Chen Qi 5695ec80f5 checkroot.sh: respect the value of ENABLE_ROOTFS_FSCK
Previously, fsck is always disabled because the value of rootcheck in
the checkroot.sh script is always set to 'no'.

We should respect the value of ENABLE_ROOTFS_FSCK in /etc/default/rcS
to allow for filesystem check.

(From OE-Core rev: 5c11cf4db8f43003fb7132b92a78659f70f07ce0)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-12 13:09:53 +01:00
Jackie Huang 89a8dcc9e8 initscripts: add dmesg file to /var/log
We should create the /var/log/dmesg.log file as a default.
If we don't then a later kernel error can flush the dmesg
ring buffer, losing valuable debug information.

(From OE-Core rev: faa8cc6c2a582a32c695f3f2b0d45b6892c769fd)

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:42:00 +01:00