|
@@ -2,12 +2,12 @@ DESCRIPTION = "SysV init scripts"
|
|
|
SECTION = "base"
|
|
|
PRIORITY = "required"
|
|
|
DEPENDS = "makedevs"
|
|
|
-DEPENDS_openzaurus = "makedevs virtual/kernel"
|
|
|
RDEPENDS = "makedevs"
|
|
|
LICENSE = "GPL"
|
|
|
-PR = "r74"
|
|
|
+PR = "r100"
|
|
|
|
|
|
-SRC_URI = "file://halt \
|
|
|
+SRC_URI = "file://functions \
|
|
|
+ file://halt \
|
|
|
file://ramdisk \
|
|
|
file://umountfs \
|
|
|
file://devices \
|
|
@@ -31,39 +31,29 @@ SRC_URI = "file://halt \
|
|
|
file://device_table.txt \
|
|
|
file://populate-volatile.sh \
|
|
|
file://volatiles \
|
|
|
- file://save-rtc.sh"
|
|
|
+ file://save-rtc.sh"
|
|
|
|
|
|
-SRC_URI_append_arm = " file://alignment.sh"
|
|
|
-SRC_URI_append_openzaurus = " file://checkversion"
|
|
|
+SRC_URI_append_arm = " file://alignment.sh"
|
|
|
|
|
|
-def read_kernel_version(d):
|
|
|
- import bb
|
|
|
- distro = bb.data.getVar('DISTRO', d, 1)
|
|
|
- filename = bb.data.getVar('STAGING_KERNEL_DIR', d, 1)
|
|
|
- if distro == "openzaurus":
|
|
|
- return file( filename + "/kernel-abiversion", "r" ).read().strip()
|
|
|
- else:
|
|
|
- return "not important"
|
|
|
KERNEL_VERSION = ""
|
|
|
-KERNEL_VERSION_openzaurus = "${@read_kernel_version(d)}"
|
|
|
-PACKAGE_ARCH_openzaurus = "${MACHINE_ARCH}"
|
|
|
|
|
|
do_install () {
|
|
|
#
|
|
|
# Create directories and install device independent scripts
|
|
|
#
|
|
|
- install -d ${D}${sysconfdir}/init.d \
|
|
|
- ${D}${sysconfdir}/rcS.d \
|
|
|
- ${D}${sysconfdir}/rc0.d \
|
|
|
- ${D}${sysconfdir}/rc1.d \
|
|
|
- ${D}${sysconfdir}/rc2.d \
|
|
|
- ${D}${sysconfdir}/rc3.d \
|
|
|
- ${D}${sysconfdir}/rc4.d \
|
|
|
- ${D}${sysconfdir}/rc5.d \
|
|
|
- ${D}${sysconfdir}/rc6.d \
|
|
|
- ${D}${sysconfdir}/default \
|
|
|
- ${D}${sysconfdir}/default/volatiles
|
|
|
+ install -d ${D}${sysconfdir}/init.d
|
|
|
+ install -d ${D}${sysconfdir}/rcS.d
|
|
|
+ install -d ${D}${sysconfdir}/rc0.d
|
|
|
+ install -d ${D}${sysconfdir}/rc1.d
|
|
|
+ install -d ${D}${sysconfdir}/rc2.d
|
|
|
+ install -d ${D}${sysconfdir}/rc3.d
|
|
|
+ install -d ${D}${sysconfdir}/rc4.d
|
|
|
+ install -d ${D}${sysconfdir}/rc5.d
|
|
|
+ install -d ${D}${sysconfdir}/rc6.d
|
|
|
+ install -d ${D}${sysconfdir}/default
|
|
|
+ install -d ${D}${sysconfdir}/default/volatiles
|
|
|
|
|
|
+ install -m 0755 ${WORKDIR}/functions ${D}${sysconfdir}/init.d
|
|
|
install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d
|
|
|
install -m 0755 ${WORKDIR}/checkroot.sh ${D}${sysconfdir}/init.d
|
|
|
install -m 0755 ${WORKDIR}/finish ${D}${sysconfdir}/init.d
|
|
@@ -82,7 +72,7 @@ do_install () {
|
|
|
install -m 0755 ${WORKDIR}/devpts ${D}${sysconfdir}/default
|
|
|
install -m 0755 ${WORKDIR}/sysfs.sh ${D}${sysconfdir}/init.d
|
|
|
install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
|
|
|
- install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
|
|
|
+ install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
|
|
|
install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
|
|
|
if [ "${TARGET_ARCH}" = "arm" ]; then
|
|
|
install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
|
|
@@ -90,13 +80,6 @@ do_install () {
|
|
|
#
|
|
|
# Install device dependent scripts
|
|
|
#
|
|
|
-
|
|
|
- if [ "${DISTRO}" = "openzaurus" ]; then
|
|
|
- cat ${WORKDIR}/checkversion | sed -e "s,VERSION,${KERNEL_VERSION}-${DISTRO_VERSION}," > ${D}${sysconfdir}/init.d/checkversion
|
|
|
- chmod 0755 ${D}${sysconfdir}/init.d/checkversion
|
|
|
- ln -sf ../init.d/checkversion ${D}${sysconfdir}/rcS.d/S01version
|
|
|
- fi
|
|
|
-
|
|
|
install -m 0755 ${WORKDIR}/banner ${D}${sysconfdir}/init.d/banner
|
|
|
install -m 0755 ${WORKDIR}/devices ${D}${sysconfdir}/init.d/devices
|
|
|
install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d/umountfs
|
|
@@ -112,7 +95,7 @@ do_install () {
|
|
|
ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc6.d/S31umountnfs.sh
|
|
|
ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc6.d/S40umountfs
|
|
|
# udev will run at S55 if installed
|
|
|
- ln -sf ../init.d/ramdisk ${D}${sysconfdir}/rcS.d/S30ramdisk
|
|
|
+ ln -sf ../init.d/ramdisk ${D}${sysconfdir}/rcS.d/S30ramdisk
|
|
|
ln -sf ../init.d/reboot ${D}${sysconfdir}/rc6.d/S90reboot
|
|
|
ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc0.d/S20sendsigs
|
|
|
# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc0.d/S30urandom
|
|
@@ -121,7 +104,7 @@ do_install () {
|
|
|
# udev will run at S55 if installed
|
|
|
ln -sf ../init.d/halt ${D}${sysconfdir}/rc0.d/S90halt
|
|
|
ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc0.d/S25save-rtc.sh
|
|
|
- ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc6.d/S25save-rtc.sh
|
|
|
+ ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc6.d/S25save-rtc.sh
|
|
|
ln -sf ../init.d/banner ${D}${sysconfdir}/rcS.d/S02banner
|
|
|
ln -sf ../init.d/checkroot.sh ${D}${sysconfdir}/rcS.d/S10checkroot.sh
|
|
|
# ln -sf ../init.d/checkfs.sh ${D}${sysconfdir}/rcS.d/S30checkfs.sh
|