rc-local: add auto run script
This commit is contained in:
@ -8,6 +8,8 @@ SRC_URI = "file://rc.local.etc \
|
||||
file://rc.local.init \
|
||||
file://LICENSE"
|
||||
|
||||
SRC_URI += "file://app.zip;unpack=0"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
inherit update-rc.d
|
||||
@ -19,5 +21,13 @@ do_install () {
|
||||
install -d ${D}/${sysconfdir}/init.d
|
||||
install -m 755 ${S}/rc.local.etc ${D}/${sysconfdir}/rc.local
|
||||
install -m 755 ${S}/rc.local.init ${D}/${sysconfdir}/init.d/rc.local
|
||||
install -d ${D}/${prefix}/local
|
||||
install -m 755 ${S}/app.zip ${D}/${prefix}/local/app.zip
|
||||
|
||||
}
|
||||
|
||||
FILES_${PN} = "${prefix}/local \
|
||||
/etc/rc.local \
|
||||
/etc/init.d \
|
||||
/etc/init.d/rc.local \
|
||||
"
|
||||
|
||||
BIN
meta-i2som-yocto/recipes-i2som/i2som-rc-local/i2som-rc-local/app.zip
Executable file
BIN
meta-i2som-yocto/recipes-i2som/i2som-rc-local/i2som-rc-local/app.zip
Executable file
Binary file not shown.
@ -10,4 +10,15 @@
|
||||
# bits.
|
||||
#
|
||||
# By default this script does nothing.
|
||||
if [ ! -f "/usr/local/app.zip" ]; then
|
||||
chmod 777 /home/root/app.zip
|
||||
cp /home/root/app.zip /tmp/ && unzip /tmp/app.zip -d /tmp/ > /dev/null
|
||||
else
|
||||
chmod 777 /usr/local/app.zip
|
||||
cp /usr/local/app.zip /tmp/ && unzip /tmp/app.zip -d /tmp/ > /dev/null
|
||||
fi
|
||||
chmod -R 777 /tmp/*
|
||||
/tmp/intelligent_app &
|
||||
/tmp/goahead/goahead --home /tmp/goahead &
|
||||
/tmp/monitor &
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user