summaryrefslogtreecommitdiffstats
path: root/meta/packages/initscripts/initscripts-1.0/functions
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/initscripts/initscripts-1.0/functions')
-rw-r--r--meta/packages/initscripts/initscripts-1.0/functions17
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 @@
1# -*-Shell-script-*-
2#
3# functions This file contains functions to be used by most or all
4# shell scripts in the /etc/init.d directory.
5#
6
7cpuinfo_id() { # return the Hardware module ID
8 awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo
9}
10
11killproc() { # kill the named process(es)
12 pid=`/bin/ps -e x |
13 /bin/grep $1 |
14 /bin/grep -v grep |
15 /bin/sed -e 's/^ *//' -e 's/ .*//'`
16 [ "$pid" != "" ] && kill $pid
17}