diff options
| author | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2006-07-21 10:10:31 +0000 |
| commit | b2f192faabe412adce79534e22efe9fb69ee40e2 (patch) | |
| tree | 7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/initscripts/initscripts_1.0.bb | |
| parent | 2cf0eadf9f730027833af802d7e6c90b44248f80 (diff) | |
| download | poky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz | |
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/initscripts/initscripts_1.0.bb')
| -rw-r--r-- | meta/packages/initscripts/initscripts_1.0.bb | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/meta/packages/initscripts/initscripts_1.0.bb b/meta/packages/initscripts/initscripts_1.0.bb new file mode 100644 index 0000000000..eebfbca7bf --- /dev/null +++ b/meta/packages/initscripts/initscripts_1.0.bb | |||
| @@ -0,0 +1,141 @@ | |||
| 1 | DESCRIPTION = "SysV init scripts" | ||
| 2 | MAINTAINER = "Chris Larson <kergoth@handhelds.org>" | ||
| 3 | SECTION = "base" | ||
| 4 | PRIORITY = "required" | ||
| 5 | DEPENDS = "makedevs" | ||
| 6 | DEPENDS_openzaurus = "makedevs virtual/kernel" | ||
| 7 | RDEPENDS = "makedevs" | ||
| 8 | LICENSE = "GPL" | ||
| 9 | PR = "r73" | ||
| 10 | |||
| 11 | SRC_URI = "file://halt \ | ||
| 12 | file://ramdisk \ | ||
| 13 | file://umountfs \ | ||
| 14 | file://devices \ | ||
| 15 | file://devpts.sh \ | ||
| 16 | file://devpts \ | ||
| 17 | file://hostname.sh \ | ||
| 18 | file://mountall.sh \ | ||
| 19 | file://banner \ | ||
| 20 | file://finish \ | ||
| 21 | file://bootmisc.sh \ | ||
| 22 | file://mountnfs.sh \ | ||
| 23 | file://reboot \ | ||
| 24 | file://checkfs.sh \ | ||
| 25 | file://single \ | ||
| 26 | file://sendsigs \ | ||
| 27 | file://urandom \ | ||
| 28 | file://rmnologin \ | ||
| 29 | file://checkroot.sh \ | ||
| 30 | file://umountnfs.sh \ | ||
| 31 | file://sysfs.sh \ | ||
| 32 | file://device_table.txt \ | ||
| 33 | file://populate-volatile.sh \ | ||
| 34 | file://volatiles " | ||
| 35 | |||
| 36 | SRC_URI_append_arm = " file://alignment.sh" | ||
| 37 | SRC_URI_append_openzaurus = " file://checkversion" | ||
| 38 | |||
| 39 | def read_kernel_version(d): | ||
| 40 | import bb | ||
| 41 | distro = bb.data.getVar('DISTRO', d, 1) | ||
| 42 | filename = bb.data.getVar('STAGING_KERNEL_DIR', d, 1) | ||
| 43 | if distro == "openzaurus": | ||
| 44 | return file( filename + "/kernel-abiversion", "r" ).read().strip() | ||
| 45 | else: | ||
| 46 | return "not important" | ||
| 47 | KERNEL_VERSION = "" | ||
| 48 | KERNEL_VERSION_openzaurus = "${@read_kernel_version(d)}" | ||
| 49 | PACKAGE_ARCH_openzaurus = "${MACHINE_ARCH}" | ||
| 50 | |||
| 51 | do_install () { | ||
| 52 | # | ||
| 53 | # Create directories and install device independent scripts | ||
| 54 | # | ||
| 55 | install -d ${D}${sysconfdir}/init.d \ | ||
| 56 | ${D}${sysconfdir}/rcS.d \ | ||
| 57 | ${D}${sysconfdir}/rc0.d \ | ||
| 58 | ${D}${sysconfdir}/rc1.d \ | ||
| 59 | ${D}${sysconfdir}/rc2.d \ | ||
| 60 | ${D}${sysconfdir}/rc3.d \ | ||
| 61 | ${D}${sysconfdir}/rc4.d \ | ||
| 62 | ${D}${sysconfdir}/rc5.d \ | ||
| 63 | ${D}${sysconfdir}/rc6.d \ | ||
| 64 | ${D}${sysconfdir}/default \ | ||
| 65 | ${D}${sysconfdir}/default/volatiles | ||
| 66 | |||
| 67 | install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d | ||
| 68 | install -m 0755 ${WORKDIR}/checkroot.sh ${D}${sysconfdir}/init.d | ||
| 69 | install -m 0755 ${WORKDIR}/finish ${D}${sysconfdir}/init.d | ||
| 70 | install -m 0755 ${WORKDIR}/halt ${D}${sysconfdir}/init.d | ||
| 71 | install -m 0755 ${WORKDIR}/hostname.sh ${D}${sysconfdir}/init.d | ||
| 72 | install -m 0755 ${WORKDIR}/mountall.sh ${D}${sysconfdir}/init.d | ||
| 73 | install -m 0755 ${WORKDIR}/mountnfs.sh ${D}${sysconfdir}/init.d | ||
| 74 | install -m 0755 ${WORKDIR}/ramdisk ${D}${sysconfdir}/init.d | ||
| 75 | install -m 0755 ${WORKDIR}/reboot ${D}${sysconfdir}/init.d | ||
| 76 | install -m 0755 ${WORKDIR}/rmnologin ${D}${sysconfdir}/init.d | ||
| 77 | install -m 0755 ${WORKDIR}/sendsigs ${D}${sysconfdir}/init.d | ||
| 78 | install -m 0755 ${WORKDIR}/single ${D}${sysconfdir}/init.d | ||
| 79 | install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d | ||
| 80 | install -m 0755 ${WORKDIR}/urandom ${D}${sysconfdir}/init.d | ||
| 81 | install -m 0755 ${WORKDIR}/devpts.sh ${D}${sysconfdir}/init.d | ||
| 82 | install -m 0755 ${WORKDIR}/devpts ${D}${sysconfdir}/default | ||
| 83 | install -m 0755 ${WORKDIR}/sysfs.sh ${D}${sysconfdir}/init.d | ||
| 84 | install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d | ||
| 85 | install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core | ||
| 86 | if [ "${TARGET_ARCH}" = "arm" ]; then | ||
| 87 | install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d | ||
| 88 | fi | ||
| 89 | # | ||
| 90 | # Install device dependent scripts | ||
| 91 | # | ||
| 92 | |||
| 93 | if [ "${DISTRO}" == "openzaurus" ]; then | ||
| 94 | cat ${WORKDIR}/checkversion | sed -e "s,VERSION,${KERNEL_VERSION}-${DISTRO_VERSION}," > ${D}${sysconfdir}/init.d/checkversion | ||
| 95 | chmod 0755 ${D}${sysconfdir}/init.d/checkversion | ||
| 96 | ln -sf ../init.d/checkversion ${D}${sysconfdir}/rcS.d/S01version | ||
| 97 | fi | ||
| 98 | |||
| 99 | install -m 0755 ${WORKDIR}/banner ${D}${sysconfdir}/init.d/banner | ||
| 100 | install -m 0755 ${WORKDIR}/devices ${D}${sysconfdir}/init.d/devices | ||
| 101 | install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d/umountfs | ||
| 102 | # | ||
| 103 | # Create runlevel links | ||
| 104 | # | ||
| 105 | ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc2.d/S99rmnologin | ||
| 106 | ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc3.d/S99rmnologin | ||
| 107 | ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc4.d/S99rmnologin | ||
| 108 | ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc5.d/S99rmnologin | ||
| 109 | ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc6.d/S20sendsigs | ||
| 110 | # ln -sf ../init.d/urandom ${D}${sysconfdir}/rc6.d/S30urandom | ||
| 111 | ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc6.d/S31umountnfs.sh | ||
| 112 | ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc6.d/S40umountfs | ||
| 113 | # udev will run at S55 if installed | ||
| 114 | ln -sf ../init.d/ramdisk ${D}${sysconfdir}/rcS.d/S30ramdisk | ||
| 115 | ln -sf ../init.d/reboot ${D}${sysconfdir}/rc6.d/S90reboot | ||
| 116 | ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc0.d/S20sendsigs | ||
| 117 | # ln -sf ../init.d/urandom ${D}${sysconfdir}/rc0.d/S30urandom | ||
| 118 | ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc0.d/S31umountnfs.sh | ||
| 119 | ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc0.d/S40umountfs | ||
| 120 | # udev will run at S55 if installed | ||
| 121 | ln -sf ../init.d/halt ${D}${sysconfdir}/rc0.d/S90halt | ||
| 122 | ln -sf ../init.d/banner ${D}${sysconfdir}/rcS.d/S02banner | ||
| 123 | ln -sf ../init.d/checkroot.sh ${D}${sysconfdir}/rcS.d/S10checkroot.sh | ||
| 124 | # ln -sf ../init.d/checkfs.sh ${D}${sysconfdir}/rcS.d/S30checkfs.sh | ||
| 125 | ln -sf ../init.d/mountall.sh ${D}${sysconfdir}/rcS.d/S35mountall.sh | ||
| 126 | ln -sf ../init.d/hostname.sh ${D}${sysconfdir}/rcS.d/S39hostname.sh | ||
| 127 | ln -sf ../init.d/mountnfs.sh ${D}${sysconfdir}/rcS.d/S45mountnfs.sh | ||
| 128 | ln -sf ../init.d/bootmisc.sh ${D}${sysconfdir}/rcS.d/S55bootmisc.sh | ||
| 129 | # ln -sf ../init.d/urandom ${D}${sysconfdir}/rcS.d/S55urandom | ||
| 130 | ln -sf ../init.d/finish ${D}${sysconfdir}/rcS.d/S99finish | ||
| 131 | ln -sf ../init.d/devices ${D}${sysconfdir}/rcS.d/S05devices | ||
| 132 | # udev will run at S04 if installed | ||
| 133 | ln -sf ../init.d/sysfs.sh ${D}${sysconfdir}/rcS.d/S03sysfs | ||
| 134 | ln -sf ../init.d/populate-volatile.sh ${D}${sysconfdir}/rcS.d/S37populate-volatile.sh | ||
| 135 | ln -sf ../init.d/devpts.sh ${D}${sysconfdir}/rcS.d/S38devpts.sh | ||
| 136 | if [ "${TARGET_ARCH}" = "arm" ]; then | ||
| 137 | ln -sf ../init.d/alignment.sh ${D}${sysconfdir}/rcS.d/S06alignment | ||
| 138 | fi | ||
| 139 | |||
| 140 | install -m 0755 ${WORKDIR}/device_table.txt ${D}${sysconfdir}/device_table | ||
| 141 | } | ||
