Commit Graph

36 Commits

Author SHA1 Message Date
Chen Qi 0ed76a495f sysvinit: use ALTERNATIVE to manage sulogin
Busybox also provides sulogin command, so we need to use the ALTERNATIVE
mechanism to manage it.

(From OE-Core master rev: 8b3a799a87d18b1d113d59b3e7a681db5683e5f8)

(From OE-Core rev: 33d7487a92905824ab46f74d7185f84662ddb922)

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>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:00:21 +00:00
Saul Wold fbe8b3ce1f sysvinit: unmount the psplash lazyily
There is an race condition where psplash is not quite exited before the unmount occurs
causing a umount: /mnt/.psplash: target is busy message to appear, it's ok to lazyily
unmount and not get this message

[YOCTO #5244]

(From OE-Core master rev: 9ded366084f22f48ef72aa22acf6a38982d16d97)

(From OE-Core rev: 8c3e3c90daee1639ac8b2633d8f1e500697d9c52)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:00:18 +00:00
Chen Qi 6894ee1baf bootlogd: create log file if not present
Previously, our system had no boot log even if the bootlogd daemon was
started correctly. The root cause is that the log file doesn't exist
when starting the bootlogd.

Add '-c' option to bootlogd so that it will create the boot log if
it doesn't exist.

[YOCTO #5273]

(From OE-Core master rev: 6059be3ab60b8ab463d438c47bb17553d184a790)

(From OE-Core rev: f676a69dee845cfd6de7a0cc8bd0bb813a8dffc0)

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>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 17:00:12 +00:00
Muhammad Shakeel 2ec209c0f4 sysvinit-inittab: Fix getting tty device name from SERIAL_CONSOLES entries
Currently the part after "tty" in the device name go into label along with
everything after that part. For example if SERIAL_CONSOLES="115200;vt100;ttyS0"
than label=S0 but if SERIAL_CONSOLES="115200;ttyS0;vt100" than label=S0;vt100.
If SERIAL_CONSOLES="..;ttyX;..", part after 'X' should also be trimmed.

(From OE-Core master rev: b00b9ae5693e04cacd0843c12a529e7f3dc501ed)

(From OE-Core rev: e807747f28798b080bf13a65293ab04c8d83834c)

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-12 16:59:53 +00:00
Saul Wold e0a351b913 sysvinit: don't use useradd
It causes shadow to be used in core-image-minimal and increase the
size by 1.5M.  We will add the shutdown user to group via base-passwd
which we depend upon instead.

[YOCTO #5230]

(From OE-Core rev: e33e4c30a4fa5b98903d6a46cdcc5bca9cf50848)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24 17:24:14 +01:00
Chen Qi 97f1c03d98 sysvinit: remove unused files
The 'need' and 'provide' files are there for simpleinit compatability,
according to the comments in these two files.

However, we don't use simpleinit and there's even no simpleinit recipe
in OE. Besides, these two files are not installed.

This patch removes these two unused files.

(From OE-Core rev: 05ac5627208c98007cd4c7aed9d76f179cd974a9)

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-09-14 08:29:42 +01:00
Chen Qi e909857be0 sysvinit: fix indentation
Fix indentation in SRC_URI to conform to the indentation convention in OE.

(From OE-Core rev: e05e7016fac7c665a23865dce18b816e01dbd51e)

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-09-14 08:29:42 +01:00
Jackie Huang 1b125078b7 sysvinit: add init.d/bootlogd status command for LSB compliance
(From OE-Core rev: 95180b966adb6ebe6451ab0e91187e7db93f22e4)

Signed-off-by: Li Wang <li.wang@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-08-26 11:47:17 +01:00
Hongxu Jia 63fd65796b sysvinit: pidof add -m option for lsbinitscripts
When reboot the system on lsb image, some kill processes would print the
following message:
...
pidof: invalid options on command line!
...

The killproc in lsbinitscripts invokes pidof with option -m, but the pidof
in sysvinit package doesn't support this.

Backport from fedora to add -m option on pidof could fix this issue.

[YOCTO #4896]

(From OE-Core rev: 8abe29811d9c5975fbd6483cb9c20b44904ae57f)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-29 13:09:03 +01:00
Laurentiu Palcu f638364eff sysvinit: allow users in shutdown group to perform halt/reboot
For this to happen:
 * 'shutdown' group has been created;
 * changed ownership group for /sbin/halt and /sbin/shutdown to 'shutdown';
 * deny execution rights to other users except 'root' and those belonging
   to 'shutdown' group;
 * set setuid bit to both apps;

So, basically, in order for a normal user to be able to shutdown/reboot
the machine, it must be a member of 'shutdown' group.

Other changes:
 * fixed identation for 2 lines that used spaces instead of tabs;

[YOCTO #4345]

(From OE-Core rev: b32d06fbe797cd39cc19f62bda8a698effe7c0ea)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-10 09:41:54 +01:00
Paul Eggleton c58cfcefce sysvinit-inittab: remove specific handling of SERIAL_CONSOLE
We already handle SERIAL_CONSOLES here and this is now set from
SERIAL_CONSOLE if not already set.

(From OE-Core rev: 40acb88afb2ebd2d468bb2fce51c6ce6bf3d8403)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-02 17:41:54 +01:00
Paul Eggleton b4aa6d3886 sysvinit-inittab: ensure unique label for SERIAL_CONSOLES entries
The label field in /etc/inittab entries needs to be unique, and the
numeric label being used for the SERIAL_CONSOLES getty entries was
clashing with the entries added for standard ttyX entries added via
SYSVINIT_ENABLED_GETTYS. Use the part after "tty" in the device name
(which is what the comment further down explicitly says should be done)
as the label rather than a simple incrementing number.

Fixes [YOCTO #4374].

(From OE-Core rev: 28d3202befcec72554885f8ea9cb7985523b89f5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-02 17:41:54 +01:00
Chen Qi f9a92d9534 sysvinit: rc: exit psplash correctly
Previously, psplash didn't go away at system startup.
The root cause is that rc checks the file '/etc/init.d/xserver-nodm' to
determine whether to exit psplash manually. So even if xserver-nodm is not
linked into runlevel 3, psplash doesn't exit.

This patch fixes this problem by letting the rc script check the file
'/etc/rc${runlevel}.d/S??xserver-nodm' to determine whether to exit psplash
manually.

[YOCTO #3904]

(From OE-Core rev: 70b14f1c4181d820e56e67f4a5d921905094dc62)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-27 11:18:27 +00:00
Jeffrey C Honig 8219b2b9b0 Resolve sysvinit and util-linux conflicting man pages.
[ CQID: WIND00404316 ]

Use alternatives mechanism to prevent sysvlinux and util-linux
man pages from causing conflicts.

(From OE-Core rev: af97a79d017722d0571d552e390f2881efe228e2)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@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:40 +00:00
Chen Qi f7bb0a97f8 sysvinit: add ROOTFS_READ_ONLY variable to rcS-default
This variable indicates whether the rootfs is intended to be read-only
or not. Changing this value from 'no' to 'yes' on a currently running
system with read-write rootfs and rebooting will give the user a working
system with read-only rootfs.

However, it is not suggested to change its value. Normally, if a read-only
rootfs is required, we should build an image with 'read-only-rootfs' image
feature.

[YOCTO #3406]

(From OE-Core rev: 0b4af5f3e6c92ae8194447b027202c1933f47dd9)

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
Saul Wold 6df7e3438f sysvinit: Update ALTERNATIVES List for utmpdump
(From OE-Core rev: 0eba0fad8d0e73cfbeab515b7796134967741b55)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-03 14:32:47 +00:00
Chen Qi 7f6edde6af hwclock.sh: improve hwclock.sh script to use UTC variable
Make UTC variable in /etc/default/rcS has effect on hwclock.sh.
This variable declares whether the Hardware Clock is kept in UTC
or local time. Default its value to "yes" and change the comment.

[YOCTO #3341]

(From OE-Core rev: 2bda4bbda3f3033cfb324778ef88f2aedad4a83b)

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>
2012-11-02 16:18:30 +00:00
Zhenhua Luo 074d49d2cc sysvinit-inittab: fix hang issue of series consoles check
The kernel boot process hangs when /proc/consoles doesn't exists, therefore
check the existence of /proc/consoles before executing pkg_postinst script.

Following is the log when /proc/consoles doesn't exist:
        Running postinst /etc/rpm-postinsts/102...
        cat: /proc/consoles: No such file or directory
        cat: /proc/consoles: No such file or directory
        cat: /proc/consoles: No such file or directory
        INIT: Entering runlevel: 5
        Starting OpenBSD Secure Shell server: sshd
          generating ssh RSA key...
          generating ssh ECDSA key...
          generating ssh DSA key...
        done.
        Starting network benchmark server: netserver.
        Starting system log daemon...0
        Starting kernel log daemon...0
        Stopping Bootlog daemon: bootlogd.
        INIT: no more processes left in this runlevel

(From OE-Core rev: 390e7f1f0b1b21d3c0787a6272583d5829561f95)

Signed-off-by: Zhenhua Luo <b19537@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-26 15:02:26 +01:00
Matthew McClintock bb330fdc00 sysvinit-inittab_2.88dsf.bb: only run serial checks at boot if we have items to check
Right now, we delay running the serial console checks to we boot up. This causes
issues for read only file systems. So, if have not configured any serial ports to
check via SERIAL_CONSOLES_CHECK we can skip the check at boot. This fixes any
issues with read only file systems and ipk packaging.

(From OE-Core rev: 019a95a5e01bd3fefaaab0a27029ed8b26ee3c79)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-12 15:13:41 +01:00
Matthew McClintock 5e7d4ca3f3 sysvinit-inittab_2.88dsf.bb: Allow multiple serial port consoles to be defined
Set SERIAL_CONSOLES if you want to define multiple serial consoles, also if
you need to check for the presence of the serial consoles you can also define
SERIAL_CONSOLES_CHECK to determine if these are present when you boot. This
will prevent error message that pop up when the serial port is not present.

SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0"
SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"

The above lines in machine.conf or elsewhere will have the effect of having
two serial consoles and removing any that are not present at boot

(From OE-Core rev: eecd65f188ba2c924626b7e1bf5c8e2eb51e9b59)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:53:56 +01:00
Mark Hatle b607fa7658 sysvinit: use new update-alternatives
Also remove postinst and prerm which were not being used.

(From OE-Core rev: 60fd9974e5c9a0576059ebded6de7b599f9574e5)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:40 +01:00
Robert P. J. Day 951aa5ea1f Various typoes fixed, all comments or output strings.
Typoes fixed: "enviroment", "editted", "spliting", "scheulder".

(From OE-Core rev: 17e981a857a51b0bec08c929e8539d36d83874b6)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-26 12:13:05 +01:00
Andreas Oberritter b2c6e1ead7 sysvinit: use update-alternatives for mountpoint and runlevel
* mountpoint and runlevel may be provided by busybox.
* Use update-alternatives to avoid conflict.

(From OE-Core rev: 3122da7cb2cbaf2f79c299acd5d2070caf07ec56)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23 17:47:40 +00:00
Lianhao Lu 17d42a4682 sysvinit-inittab: Fixed license warning.
WARNING: .../sysvinit-inittab-2.88dsf-r6/sysvinit-2.88dsf/COPYING could
not be copied for some reason. It may not exist. WARN for now.

(From OE-Core rev: 85e4d0c4bb024a67b61afb0f0fedfb15d6aa0d18)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-20 15:21:38 +00:00
Matthew McClintock 7dec9be56b Introduce new SERIAL_CONSOLES to add multiple consoles for your MACHINE
Just define additional serial consoles like so:

SERIAL_CONSOLES="115200;ttyS0 115200;ttyS1 ... 115200;ttySN"

Also be sure to remove SERIAL_CONSOLE (lacking the S) from your
machine as they can conflict.

(From OE-Core rev: a61b5e980d45df4dc2c83dd13996b0563fddf803)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:16 +00:00
Dongxiao Xu ce4c33ed8a sysvinit: Change ${PN} to ${BPN} in file names
Some files in sysvinit are named with ${PN}. In multilib case, ${PN}
will be prefixed with "lib32-" or "lib64-". Use ${BPN} instead.

(From OE-Core rev: c7bcf6e7c851269178af99ed9096207ab14fe76c)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-19 09:29:19 -07:00
Richard Purdie 00d7ba1750 sysvinit-inittab: Inhibit compiler/libc dependencies as this is just a configuration file 2011-06-13 22:38:05 +01:00
Koen Kooi b0c29c253d sysvinit: split inittab into it's own recipe
Implements the improvements suggested in the original fix for [YOCTO #1131]

(From OE-Core rev: e9cde6962d369fb620799d0370ea9dc7d6234d37)

Signed-off-by: <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 15:48:29 +01:00
Richard Purdie 5d9ea7dea4 sysvinit: Mark as machine specific since there are machine specific components to this recipe
The inittab file depends on variables that are part of the machine config
such as the SERIAL_CONSOLE so the whole recipe must get built as machine
specific. Better might be to split the config out into a separate recipes
from the binaries but this fixes the immediate problem.

[YOCTO ##1131]

(From OE-Core rev: 5bcd6b2c3e935858ac80b17266b9e427060c1650)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-02 16:52:43 +01:00
Koen Kooi 8074582e12 sysvinit: make pidof usuable in a standalone setting
Currently it's a symlink to killall5:

$ dpkg-deb -c sysvinit-pidof_2.88dsf-r1_armv7a.ipk  | grep pidof
lrwxrwxrwx root/root         0 2011-05-27 11:05 ./bin/pidof.sysvinit -> /sbin/killall5

The point of the pidof subpackage was to have a pidof without needing sysvinit, this restores that behaviour.

(From OE-Core rev: 3490772a87eda8d86027d4150a7c1b94c9ee282a)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-31 12:46:45 +01:00
Qing He 9deb373671 update patch upstream status
This patch includes the update of patch upstream status of the following
recipes (50 in all):

grub pciutils setserial dhcp iproute2 libnss-mdns nfs-utils openssl portmap
busybox coreutils dbus dropbear ncurses readline sysfsutils sysvinit tinylogin
udev update-rc.d util-linux elfutils file pkgconfig syslinux ubootchart
yaffs2 findutils gamin hdparm libaio libzypp parted procps sat-solver
screen sed sysklogd tcp-wrapper time zypper attr boost createrepo gnutls
hal js libgcrypt libnl libusb-compat

(From OE-Core rev: 1e6f767663b7d5fb6277fd2b214f4a50e24d4ffd)

Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-13 11:02:14 +01:00
Saul Wold 3d08b9f2c6 SRC_URI Checksums Additionals
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2010-12-09 08:18:17 -08:00
Saul Wold deba7adc4b sysvinit: add check for no X11 to disbale psplash
Add a check to the rc script to check if the /etc/init.d/xserver-nodm
script exists and is executable and not disable psplash if it is,
otherwise disable pspalsh since we do not have X installed.

Fixed [BUG #457]

Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-10-14 20:12:03 +01:00
Mark Hatle fa647b9176 recipes-core: Cleanup package descriptions and summaries
[BUGID #281]

Evaluate and update each package in recipes-core to ensure they have a
consistent summary and description.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-10-11 22:15:10 +01:00
Richard Purdie 29d6678fd5 Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things
and is generally overwhelming. This commit splits it into several
logical sections roughly based on function, recipes.txt gives more
information about the classifications used.

The opportunity is also used to switch from "packages" to "recipes"
as used in OpenEmbedded as the term "packages" can be confusing to
people and has many different meanings.

Not all recipes have been classified yet, this is just a first pass
at separating things out. Some packages are moved to meta-extras as
they're no longer actively used or maintained.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-27 15:29:45 +01:00