de33af11b872a82df94e30d8bbed453b54a97d99
[vuplus_openembedded] / initscripts / initscripts_1.0.oe
1 DESCRIPTION = "SysV init scripts"
2 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
3 SECTION = "base"
4 PRIORITY = "required"
5 DEPENDS = "makedevs"
6 RDEPENDS = "makedevs"
7 LICENSE = "GPL"
8 PR = "r21"
9
10 SRC_URI = "file://halt \
11            file://ramdisk \
12            file://umountfs \
13            file://devices \
14            file://devpts.sh \
15            file://devpts \
16            file://hostname.sh \
17            file://mountall.sh \
18            file://banner \
19            file://finish \
20            file://bootmisc.sh \
21            file://mountnfs.sh \
22            file://reboot \
23            file://checkfs.sh \
24            file://single \
25            file://sendsigs \
26            file://urandom \
27            file://rmnologin \
28            file://checkroot.sh \
29            file://umountnfs.sh \
30            file://sysfs.sh \
31            file://device_table.txt"
32
33 SRC_URI_append_arm = " file://alignment.sh"
34
35 do_install () {
36 #
37 # Create directories and install device independent scripts
38 #
39         install -d ${D}/${sysconfdir}/init.d \
40                    ${D}/${sysconfdir}/rcS.d \
41                    ${D}/${sysconfdir}/rc0.d \
42                    ${D}/${sysconfdir}/rc1.d \
43                    ${D}/${sysconfdir}/rc2.d \
44                    ${D}/${sysconfdir}/rc3.d \
45                    ${D}/${sysconfdir}/rc4.d \
46                    ${D}/${sysconfdir}/rc5.d \
47                    ${D}/${sysconfdir}/rc6.d \
48                    ${D}/${sysconfdir}/default
49
50         install -m 0755    ${WORKDIR}/bootmisc.sh       ${D}/etc/init.d
51         install -m 0755    ${WORKDIR}/checkroot.sh      ${D}/etc/init.d
52         install -m 0755    ${WORKDIR}/finish            ${D}/etc/init.d
53         install -m 0755    ${WORKDIR}/halt              ${D}/etc/init.d
54         install -m 0755    ${WORKDIR}/hostname.sh       ${D}/etc/init.d
55         install -m 0755    ${WORKDIR}/mountall.sh       ${D}/etc/init.d
56         install -m 0755    ${WORKDIR}/mountnfs.sh       ${D}/etc/init.d
57         install -m 0755    ${WORKDIR}/ramdisk           ${D}/etc/init.d
58         install -m 0755    ${WORKDIR}/reboot            ${D}/etc/init.d
59         install -m 0755    ${WORKDIR}/rmnologin ${D}/etc/init.d
60         install -m 0755    ${WORKDIR}/sendsigs          ${D}/etc/init.d
61         install -m 0755    ${WORKDIR}/single            ${D}/etc/init.d
62         install -m 0755    ${WORKDIR}/umountnfs.sh      ${D}/etc/init.d
63         install -m 0755    ${WORKDIR}/urandom           ${D}/etc/init.d
64         install -m 0755    ${WORKDIR}/devpts.sh ${D}/etc/init.d
65         install -m 0755    ${WORKDIR}/devpts            ${D}/etc/default
66         install -m 0755    ${WORKDIR}/sysfs.sh          ${D}/etc/init.d
67         if [ "${TARGET_ARCH}" = "arm" ]; then
68                 install -m 0755 ${WORKDIR}/alignment.sh ${D}/etc/init.d
69         fi
70 #
71 # Install device dependent scripts
72 #
73         install -m 0755 ${WORKDIR}/banner       ${D}/etc/init.d/banner
74         install -m 0755 ${WORKDIR}/devices      ${D}/etc/init.d/devices
75         install -m 0755 ${WORKDIR}/umountfs     ${D}/etc/init.d/umountfs
76 #
77 # Create runlevel links
78 #
79         ln -sf          ../init.d/rmnologin     ${D}/etc/rc2.d/S99rmnologin
80         ln -sf          ../init.d/rmnologin     ${D}/etc/rc3.d/S99rmnologin
81         ln -sf          ../init.d/rmnologin     ${D}/etc/rc4.d/S99rmnologin
82         ln -sf          ../init.d/rmnologin     ${D}/etc/rc5.d/S99rmnologin
83         ln -sf          ../init.d/sendsigs      ${D}/etc/rc6.d/S20sendsigs
84 #       ln -sf          ../init.d/urandom       ${D}/etc/rc6.d/S30urandom
85         ln -sf          ../init.d/umountnfs.sh  ${D}/etc/rc6.d/S31umountnfs.sh
86 #       ln -sf          ../init.d/umountfs      ${D}/etc/rc6.d/S40umountfs
87         ln -sf          ../init.d/ramdisk       ${D}/etc/rcS.d/S30ramdisk 
88         ln -sf          ../init.d/reboot        ${D}/etc/rc6.d/S90reboot
89         ln -sf          ../init.d/sendsigs      ${D}/etc/rc0.d/S20sendsigs
90 #       ln -sf          ../init.d/urandom       ${D}/etc/rc0.d/S30urandom
91         ln -sf          ../init.d/umountnfs.sh  ${D}/etc/rc0.d/S31umountnfs.sh
92 #       ln -sf          ../init.d/umountfs      ${D}/etc/rc0.d/S40umountfs
93         ln -sf          ../init.d/halt          ${D}/etc/rc0.d/S90halt
94         ln -sf          ../init.d/banner        ${D}/etc/rcS.d/S01banner
95         ln -sf          ../init.d/checkroot.sh  ${D}/etc/rcS.d/S10checkroot.sh
96 #       ln -sf          ../init.d/checkfs.sh    ${D}/etc/rcS.d/S30checkfs.sh
97         ln -sf          ../init.d/mountall.sh   ${D}/etc/rcS.d/S35mountall.sh
98         ln -sf          ../init.d/hostname.sh   ${D}/etc/rcS.d/S40hostname.sh
99         ln -sf          ../init.d/mountnfs.sh   ${D}/etc/rcS.d/S45mountnfs.sh
100         ln -sf          ../init.d/bootmisc.sh   ${D}/etc/rcS.d/S55bootmisc.sh
101 #       ln -sf          ../init.d/urandom       ${D}/etc/rcS.d/S55urandom
102         ln -sf          ../init.d/finish        ${D}/etc/rcS.d/S99finish
103         ln -sf          ../init.d/devices       ${D}/etc/rcS.d/S04devices
104         # udev will run at S03 if installed
105         ln -sf          ../init.d/sysfs.sh      ${D}/etc/rcS.d/S02sysfs
106         ln -sf          ../init.d/devpts.sh     ${D}/etc/rcS.d/S38devpts.sh
107         if [ "${TARGET_ARCH}" = "arm" ]; then
108                 ln -sf  ../init.d/alignment.sh  ${D}/etc/rcS.d/S05alignment
109         fi
110
111         install -m 0755    ${WORKDIR}/device_table.txt          ${D}/etc/device_table
112 }