aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0/functions
blob: 689fd32b3947d6f8b10a49cd605e6a7c6f9746aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*-Shell-script-*-
#
# functions     This file contains functions to be used by most or all
#               shell scripts in the /etc/init.d directory.
#

machine_id() {		# return the machine ID
    awk 'BEGIN { FS=": " } /Hardware/ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
}

killproc() {		# kill the named process(es)
    pid=`/bin/pidof $1`
    [ "$pid" != "" ] && kill $pid
}