mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 21:32:13 +02:00
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
This commit is contained in:
17
meta/packages/initscripts/initscripts-1.0/functions
vendored
Normal file
17
meta/packages/initscripts/initscripts-1.0/functions
vendored
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user