MTD 248-645A Instrukcja Użytkownika Strona 289

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 347
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 288
Linux From Scratch - Version 7.0
269
else
pidofproc -s -p "${pidfile}" "${1}"
fi
# Store the return status
ret=$?
if [ -n "${pidlist}" ]; then
${ECHO} -e "${INFO}${base} is running with Process"\
"ID(s) ${pidlist}.${NORMAL}"
else
if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then
${ECHO} -e "${WARNING}${1} is not running but"\
"/var/run/${base}.pid exists.${NORMAL}"
else
if [ -n "${pidfile}" -a -e "${pidfile}" ]; then
${ECHO} -e "${WARNING}${1} is not running"\
"but ${pidfile} exists.${NORMAL}"
else
${ECHO} -e "${INFO}${1} is not running.${NORMAL}"
fi
fi
fi
# Return the status from pidofproc
return $ret
}
# The below functions are documented in the LSB-generic 2.1.0
#*******************************************************************************
# Function - pidofproc [-s] [-p pidfile] pathname
#
# Purpose: This function returns one or more pid(s) for a particular daemon
#
# Inputs: -p pidfile, use the specified pidfile instead of pidof
# pathname, path to the specified program
#
# Outputs: return 0 - Success, pid's in stdout
# return 1 - Program is dead, pidfile exists
# return 2 - Invalid or excessive number of arguments,
# warning in stdout
# return 3 - Program is not running
#
# Dependencies: pidof, echo, head
#
# Todo: Remove dependency on head
# This replaces getpids
# Test changes to pidof
#
#*******************************************************************************
pidofproc()
{
local pidfile=""
local lpids=""
local silent=""
pidlist=""
Przeglądanie stron 288
1 2 ... 284 285 286 287 288 289 290 291 292 293 294 ... 346 347

Komentarze do niniejszej Instrukcji

Brak uwag