2007-09-02 14:00:52 +00:00
|
|
|
# -*-Shell-script-*-
|
|
|
|
#
|
|
|
|
# functions This file contains functions to be used by most or all
|
|
|
|
# shell scripts in the /etc/init.d directory.
|
|
|
|
#
|
|
|
|
|
2011-05-17 01:29:25 +00:00
|
|
|
machine_id() { # return the machine ID
|
|
|
|
awk 'BEGIN { FS=": " } /Hardware/ \
|
|
|
|
{ gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
|
2007-09-02 14:00:52 +00:00
|
|
|
}
|
|
|
|
|
2011-05-17 01:29:25 +00:00
|
|
|
killproc() { # kill the named process(es)
|
|
|
|
pid=`/bin/pidof $1`
|
|
|
|
[ "$pid" != "" ] && kill $pid
|
2007-09-02 14:00:52 +00:00
|
|
|
}
|