Commit Graph

57 Commits

Author SHA1 Message Date
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
Jackie Huang 5b4494950d initscripts: overwrite default hostname.sh
/etc/init.d/hostname.sh does not have a graceful fallback if the
/etc/hostname file doesn't exist. Other systems such as Ubuntu and RH
will either leave the hostname in place, if a proper hostname is
already set, otherwise it will set the hostname to 'localhost' when
the /etc/hostname files doesn't exist.

As you can see we have to add some additional handling to provide this
behavior when the system's hostname command doesn't take the '-b'
option.

(From OE-Core rev: 09e59f1dad9fb52adb1717840837e42a36a6c7a1)

Signed-off-by: Mark Asselstine <mark.asselstine@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
Jesse Zhang 3f561e9b3e initscripts: let status return 0 when proc is running well
Ensure that the status returns 0 instead of the last shell command result,
otherwise the calling script can not properly detect the status of pid.

(From OE-Core rev: d9d4fdc769dfe6bf9838f5c5f3189a80f0e3cf90)

Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 20:59:11 +01:00
Jonathan Liu ea647cd9ee base-files: add /run directory from FHS 3 draft specification
This adds the /run directory from the Filesystem Hierarchy Standard 3.0
Draft [1] and refactors the filesystem as follows:
- Remove creation of /var/volatile/run
- Remove creation of /var/volatile/lock
- Remove symbolic link from /var/run to /var/volatile/run
- Remove symbolic link from /var/lock to /var/volatile/lock
- Add symbolic link from /var/run to /run
- Add symbolic link from /var/lock -> /run/lock
- Add /run to /etc/fstab for sysvinit compatibility

[1] http://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData

(From OE-Core rev: 0e326280a15b0f2c4ef2ef4ec441f63f55b75873)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29 22:07:56 +01:00
Jonathan Liu 657e46480b populate-volatile.sh: remove repeated leading slashes in TNAME
This avoids triple slashes in the generated /etc/volatile.cache to
reduce disk usage and in the output when verbose mode is enabled.

As all the paths for volatiles start with a slash, we can change
TNAME=${ROOT_DIR}/${TNAME} to TNAME=${ROOT_DIR}${TNAME}. To avoid
a double slash when ROOT_DIR is /, we strip the extra slash from
ROOT_DIR.

(From OE-Core rev: af56670f656ec0989aa7fd6cf6037cbc9cd88185)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24 14:14:47 +01:00
Paul Eggleton cb4db44c14 initscripts: fix read-only-rootfs-hook.sh to start earlier
Mount /var/volatile ourselves so that we can set up the writable area
first. This fixes the urandom service not starting properly when
read-only-rootfs is enabled.

(From OE-Core rev: 44c7d8a27a84a04251408e9a7d9550629bc17704)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 16:49:24 +01:00
Paul Eggleton 1b7785c537 initscripts: fix read-only-rootfs-hook.sh to avoid using unionfs
Unionfs isn't available everywhere, and we can get similar results (if
not quite as neatly) by using bind mounts + tmpfs and copying the data
over.

(From OE-Core rev: 5a8ba93efa554c3b4d3b48ca8d668419a8c77f42)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-10 16:49:24 +01:00
Ross Burton f76d4b3549 udev: move /run volatile entry to udev instead of initscripts
initscripts is generally installed on systemd-using images, but because it
specifies that /run is a symlink to /var/run managed by volatiles it totally
breaks systemd by copying/deleting /run from underneath systemd.  Deleting
sockets mid-boot doesn't leave systemd in a happy place.

As this volatile reference of /run was introduced by udev 182, move it's
reference to the udev recipe.  This way it will never be present on systemd
images, as systemd manages /run as a tmpfs itself.

(From OE-Core rev: 5b0257e318340c2d6c8d3b0c3fa32272d6e9526b)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-26 22:43:05 +00:00
Chen Qi 58b1ccf046 populate-volatile.sh: remove trailing whitespaces
Remove trailing whitespaces.

(From OE-Core rev: 082dca6f73858581863f103b467ff73cebe2c0da)

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-03-07 11:14:33 +00:00
Chen Qi 297906d39c populate-volatile.sh: improve the handling of link config items
Previously, if there's a link config item in the config file like

	    l root root 1777 /tmp /var/tmp

and /tmp has existed, the symlink will not be created correctly.

Another example is the /run directory. If /run directory has been
created by some recipe or script before populate-volatile.sh runs,
the symlink of /run to /var/run will not be created correctly.

This patch ensures that the system creates symlinks exactly as the
config file tells it.

[YOCTO #3404]
[YOCTO #3406]

(From OE-Core rev: a54287d8e3d75a727c8ed5654a822bda256b0849)

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-03-07 11:14:33 +00:00
Chen Qi bf7a5b449c populate-volatile.sh: add ROOT_DIR variable to support running at rootfs time
For populate-volatile.sh script to run correctly both at rootfs time and
at system boot time, it needs to be aware of which situation it is now in.

We use the ROOT_DIR variable to indicate whether it is run at rootfs time or
not. ROOT_DIR being "/" indicates that this script is run at system boot time,
otherwise, it is run at rootfs time.

Also, we ignore failures when running this script at rootfs time.
For example, if ${ROOT_DIR}/var/dir1 is symlink to /var/volatile/dir1, it's
possible that the link is a dead link. So if we're going to create some file
under ${ROOT_DIR}/var/dir1, it will fail. But the failure does no harm,
because this script will always run at system boot time to set up the correct
files and directories.

[YOCTO #3406]

(From OE-Core rev: 45396e3edcce4a33fcbef6456f31811f30c26c63)

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-03-07 11:14:33 +00:00
Jesse Zhang 2e913bc62a initscripts: Add status function to /etc/init.d/functions
[ CQID: WIND00388860 ]

Many initscripts want a simple way to display status information.
Add the 'status' function to the functions file.

(From OE-Core rev: adcb39845b6d3af9472fa5051a1d918344eb6bda)

Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-08 14:50:38 +00:00
Richard Purdie 2180cc32b9 initiscripts: Fix populate-volatiles.sh whitespace
(From OE-Core rev: d69935fbef2b5a8b187e58ac5ade0ffb9f95f803)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 14:44:49 +00:00
Laurentiu Palcu ebe0730946 initscripts: remove /var/cache from volatiles
(From OE-Core rev: 961376bf34dbc65e649c3fe6f2d9e1838d987aef)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 09:37:29 +00:00
Chen Qi 7c106a3bb8 initscripts: add read-only-rootfs-hook.sh script
Add read-only-rootfs-hook.sh script to support a read-only rootfs.
This script makes a union mount of /var/lib and /var/volatile/lib,
making /var/lib directory writable.

[YOCTO #3406]

(From OE-Core rev: a9591158962eee1f8ae04168d6256032ecd7bc6b)

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-02-06 09:37:28 +00:00
Chen Qi db5847dd41 initscripts: let populate-volatile.sh create the /tmp link
Previously, the /tmp link (/tmp -> /var/tmp) was created by the
bootmisc.sh script. So in case of a read-only rootfs, this symlink
would not be created correctly.

The populate-volatile.sh script is intended to handle all directories
and files related to volatile storage, so we should let it create
the /tmp link.

In addition, because of the improments of populate-volatile.sh, the data
loss problem of bug#3404 is also resolved by this patch.

[YOCTO #3406]
[YOCTO #3404]

(From OE-Core rev: 12c4acd7ac5a27cf3676065b60f1c8395c96854c)

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-02-06 09:37:27 +00:00
Chen Qi 43c2c5b426 sysvinit & initscripts: use update-rc.d
Update-rc.d provides a cleaner interface for creating links for init scripts.
So we use update-rc.d to replace the redundant 'ln -sf xxx' statements.

[YOCTO #3708]

(From OE-Core rev: 66f3e3c15faedc9ee78532b4c59fa5d7148ddace)

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-01-28 12:29:30 +00:00
Chen Qi c7f170bcb8 initscripts: remove finish.sh
Remove finish.sh from initscripts as it is no longer used.

(From OE-Core rev: 3bcd9188f919da1b10f692d29ef34cd18ef88184)

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-01-15 08:12:05 +00:00
Roy.Li 9a1c99916b replace portmap with rpcbind.
Rpcbind has more features, like ipv6 support and nfs4 support;
Redhat, Fedora, debian, Ubuntu are using rpcbind by default.

(From OE-Core rev: 86ec57e2837465954f51fc55fce990b5ec6b1063)

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>
2012-12-31 09:43:24 +00:00
Ming Liu 4392663569 initscripts/urandom: create directory before staging into it
/etc/init.d/urandom fails to start/stop because it tries to save
random-seed into /var/lib/urandom folder which does not exist in the
file system.

Fixed by creating /var/lib/urandom at do_install time.

[YOCTO #3518]
[ CQID: WIND00384168 ]

(From OE-Core rev: 42e37058e06c76c6782d5371d4a60d260f00fa20)

Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 17:55:08 +00:00
Alexandru DAMIAN 4d7b2d2944 udev: upgrade to 182
This is the final upgrade of udev. Futher upgrades will only
come in conjunction with systemd.

The v4l1 removal patch is deprecated as the bug is fixed inside udev.
There is a new patch fixing the path for default sh interpreter.
New debug binaries are generated, and udev.inc is modified to package
those correctly.
The install locations changed for udevd and udevadm, so the scripts
are updated accordingly.

(From OE-Core rev: 3cbe52b94c4d559a037347ac419fafee5af84fe6)

(From OE-Core rev: 8fc73baecf1b21b1a3e7eff478e25d2a7cae2879)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>

Conflicts:

	meta/recipes-core/udev/udev_164.bb

sgw - Fixed up DEPENDS += and added some OECONF options that where in the
meta-oe version and make sense to be included.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-25 17:50:19 +01:00
Tom Zanussi af30de3ea1 initscripts/sysfs.sh: mount debugfs if present
debugfs is another kernel virtual file system that should be mounted
if configured, so if it's configured into the kernel, mount it.

(From OE-Core rev: 55c4d3c55e4c3a7c2cda6d006cf7b78567bd3298)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 11:30:37 +01:00
Christopher Larson 142ac1aba1 initscripts: don't bg mk_dirs in populate-volatile
If a directory needs to be created to create something else in volatiles,
there's no guarantees on ordering due to the backgrounding. We can't guarantee
with certainty that the create directory commands are complete before the
later ones run. This ensures that we wait for directory creations to complete
before we proceed.

Chris Hallinan hit an actual failure due to this back in March of last year.

(From OE-Core rev: 138c3c26830e48a56ca7cb3e5feca324d13ec89c)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:40:44 +01:00
Kang Kai d6170515e1 initscripts: use update-alternative to handle file functions
lsb need a more abundant /etc/init.d/functions file to handle lsb test.
Use update-alternative to install file funtions in package initscripts,
when package lsbinitscripts installed the file functions of
lsbinitscripts will be used.

(From OE-Core rev: 478f821462665a9dc6f1755059cdbf642aebbf4d)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-09 11:38:01 +01:00
Andreas Oberritter d90cfa776f initscripts: test whether /etc/init.d/hwclock.sh exists
* bootmisc.sh executes /etc/init.d/hwclock.sh, which
  is optional (depends on CONFIG_HWCLOCK in busybox).

(From OE-Core rev: 9c8300f030b69652ad39e1bc2979f5d9a03adf1e)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-13 23:18:47 +00:00
James Limbouris 348ea458a4 initscripts: Create the volatiles cache atomically.
If a machine loses power while building the volatiles cache, it will
continue to operate with an incomplete set of volatiles. Fix this by
updating atomically.

(From OE-Core rev: a60432ff4588390f5f955a6da234298e958546e6)

Signed-off-by: James Limbouris <james@digitalmatter.com.au>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-02 15:22:54 +00:00
Gary Thomas 8b07ab0cea initscripts: Properly format date when set from timestamp
Reformat date, as stored in /etc/timestamp, to match CLI format.

(From OE-Core rev: 7aa4c51089cc4a2811bd11842647839d1e4b1e95)

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-01 23:16:43 +00:00
Andreas Oberritter e894f0e71c initscripts: mount and unmount cifs network filesystems
* Added cifs to mountnfs.sh and umountnfs.sh.

(From OE-Core rev: c44e51f281101c8933679f679e3d4a75a41bedf7)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 23:25:53 +00:00
Gary Thomas daeb5beb8f initscripts: Make /etc/timestamp consistent again.
Commit cc8695 changed the way timestamps were handled
and added some extra munging to be able to compare them
reliably.  This change makes the timestamp value the same
everywhere and simplifies how the check to set the system
clock based on the timestamp is done.

Also, if the value stored in /etc/timestamp is newer
[at all] than the current system time, set the system clock
from the stored value, down to the minute, not just the day.

(From OE-Core rev: 5aab6653c9afa05e7c1b3ccd6bd34aec05c2a6f8)

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23 23:59:35 +00:00
Martin Jansa 6b2b5d2acd initscripts: remove space from shebang, just cosmetics
* at least in initscripts it's consistent now

(From OE-Core rev: 20d5effcf192d469883b5ac899cbd2340b71bd2c)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-24 11:05:30 +00:00
Martin Jansa c6a2c300d1 initscripts: add shebang where it was missing completely
(From OE-Core rev: d58fc7a3ccede8706bf6a6aa7f7301f716128db8)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-24 11:05:29 +00:00
Otavio Salvador f51ecaf349 initscripts: avoid mounting /sys if it is already mounted
(From OE-Core rev: fdb3d74458cd36a0fe53ee097394acc37d658ce9)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06 12:11:33 +00:00
Lauri Hintsala 91367de755 initscripts: fix timestamp checking at bootmisc.sh
Timestamp checking has been broken by the commit
2078af333d. Currently the RTC time
is always overwritten with the time from /etc/timestmap. Fix timestamp
checking and clean the code.

(From OE-Core rev: cc8695f22bc70ef958f81d0d3da73dece5f4700a)

Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-15 14:36:23 +00:00
Robert Yang 356ae2563b The Skeleton initscript doesn't work on minimal image
Fixes bug [YOCTO #1165]

The /etc/init.d/skeleton doesn't work on minimal image, this is
because of the pidofproc doesn't return "$?" correctly, so store
$? in the variable status would fix it.

(From OE-Core rev: 4d31193a6969df25bb85a9862b7295e85dcec04b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-15 15:26:21 +01:00
Richard Purdie 8511d1ec1b Drop PRIORITY variable
As discussed on the mailing list, this variable isn't useful and if wanted
would be better implemented by distros using pn-X overrides.

This patch executes:

find . -regex ".*\.\(bb\|inc\)$" | xargs sed -i '/^PRIORITY = ".*"$/d'

against the tree removing the referenced. Thanks to Phil Blundell for
the command.

(From OE-Core rev: d122343362669c683acc4af295971a62cbc823fc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 23:27:29 +01:00
Dongxiao Xu 69aac1a91f initscript: Change some order of init scripts
Move udev script to execute ealier since module autoload needs it to
create device nodes.

Also move sysfs before udev which has dependency on it.

(From OE-Core rev: fe7cef6febdb938b535259b09690192b17074314)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-29 14:46:55 +01:00
Richard Purdie 2c72fd6074 initscripts: makedevs is no longer used anywhere so drop dependency. Also inhibit compiler/libc dependencies as they're unused 2011-06-13 22:38:05 +01:00
Robert Yang 0424560e5f Add pidofproc to ${sysconfdir}/init.d/functions
Add pidofproc to ${sysconfdir}/init.d/functions, this is used for
getting the pid of the process. It uses pidof to implement currently, it
may also use the pidfile or ps to implement in the future.

(From OE-Core rev: 114a11628fb04c30cc96c9fd23db7a7fbc4fd02e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-18 14:32:45 +01:00
Robert Yang 0b175c42d7 Cleanup the whitespace in functions
Cleanup the whitespace in functions, replace the 4 whitespaces
indent with tab.

(From OE-Core rev: 60df57a54ebfe8fa1c1574bcd7900c58810aa2d2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-18 14:32:45 +01:00
Yu Ke 2ce14da681 Upstream-Status update for several recipes
- modutils
 - module-init-tools
 - libacpi
 - keymaps
 - initscripts
 - console-tools
 - mesa-demos
 - xserver-xf86-lite

(From OE-Core rev: 46ea0444276c67b1489004e959bcf34970cd6c60)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-17 15:14:43 +01:00
Paul Eggleton 3a41c1eb3e initscripts: remove -i from halt/reboot arguments and allow override
Introduces a variable HALTARGS which specifies the arguments sent to
halt and reboot, and sets the default value to "-d -f", dropping the
previous -i (shut down all network interfaces before halt/reboot, which
causes a freeze with NFS root.)

Fixes [YOCTO #997].

(From OE-Core rev: ace183894a5319cd73c94fd2653bbe52f29dca0b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 12:26:32 +01:00
Richard Purdie 211ae3b4df initscripts: Drop outdated machine specific files
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-21 00:29:29 +01:00