i2SOM:Yocto: add i2som-rc-local recipe
It used for user auto run the application after system boot up.
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
# Copyright (C) 2012 O.S. Systems Software LTDA.
|
||||
|
||||
DESCRIPTION = "Extra files for i2SOM"
|
||||
LICENSE = "LGPLv2"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=ea1702d2dd5887e7d3b81aeba3b730e4"
|
||||
|
||||
SRC_URI = "file://rc.local.etc \
|
||||
file://rc.local.init \
|
||||
file://LICENSE"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
inherit update-rc.d
|
||||
|
||||
INITSCRIPT_NAME = "rc.local"
|
||||
INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
|
||||
|
||||
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
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
All content inside i2som-rc-local package are distributed under GPLv2 license
|
||||
13
meta-i2som-yocto/recipes-i2som/i2som-rc-local/i2som-rc-local/rc.local.etc
Executable file
13
meta-i2som-yocto/recipes-i2som/i2som-rc-local/i2som-rc-local/rc.local.etc
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# rc.local
|
||||
#
|
||||
# This script is executed at the end of each multiuser runlevel.
|
||||
# Make sure that the script will "exit 0" on success or any other
|
||||
# value on error.
|
||||
#
|
||||
# In order to enable or disable this script just change the execution
|
||||
# bits.
|
||||
#
|
||||
# By default this script does nothing.
|
||||
exit 0
|
||||
36
meta-i2som-yocto/recipes-i2som/i2som-rc-local/i2som-rc-local/rc.local.init
Executable file
36
meta-i2som-yocto/recipes-i2som/i2som-rc-local/i2som-rc-local/rc.local.init
Executable file
@ -0,0 +1,36 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: rc.local
|
||||
# Required-Start: $all
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop:
|
||||
# Short-Description: Run /etc/rc.local if it exist
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
|
||||
do_start() {
|
||||
if [ -x /etc/rc.local ]; then
|
||||
echo -n "Running local boot scripts (/etc/rc.local)"
|
||||
/etc/rc.local
|
||||
[ $? = 0 ] && echo "." || echo "error"
|
||||
return $ES
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
do_start
|
||||
;;
|
||||
restart|reload|force-reload)
|
||||
echo "Error: argument '$1' not supported" >&2
|
||||
exit 3
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 start|stop" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user