diff options
author | Richard Purdie <richard@openedhand.com> | 2007-09-02 14:00:52 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2007-09-02 14:00:52 +0000 |
commit | 1cf731b1e3bb125449c2ef4e1194b6bf69e7b667 (patch) | |
tree | fc305d382d225d9a033fb1678bdc4720f38484e4 /meta/packages/initscripts/initscripts-1.0/functions | |
parent | 3cb6c768efa690f25035351fb7975bca59f94ee2 (diff) | |
download | openembedded-core-1cf731b1e3bb125449c2ef4e1194b6bf69e7b667.tar.gz openembedded-core-1cf731b1e3bb125449c2ef4e1194b6bf69e7b667.tar.bz2 openembedded-core-1cf731b1e3bb125449c2ef4e1194b6bf69e7b667.zip |
initscripts: Sync with OE, primarily for better /etc/timestamp handling
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2650 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/initscripts/initscripts-1.0/functions')
-rw-r--r-- | meta/packages/initscripts/initscripts-1.0/functions | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/packages/initscripts/initscripts-1.0/functions b/meta/packages/initscripts/initscripts-1.0/functions new file mode 100644 index 0000000000..358fc6edb3 --- /dev/null +++ b/meta/packages/initscripts/initscripts-1.0/functions @@ -0,0 +1,17 @@ +# -*-Shell-script-*- +# +# functions This file contains functions to be used by most or all +# shell scripts in the /etc/init.d directory. +# + +cpuinfo_id() { # return the Hardware module ID + awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo +} + +killproc() { # kill the named process(es) + pid=`/bin/ps -e x | + /bin/grep $1 | + /bin/grep -v grep | + /bin/sed -e 's/^ *//' -e 's/ .*//'` + [ "$pid" != "" ] && kill $pid +} |