40 |
|
|
41 |
COLOREDSTAR="${COLBLUE}(${COLGREEN}*${COLBLUE})${COLDEFAULT} " |
COLOREDSTAR="${COLBLUE}(${COLGREEN}*${COLBLUE})${COLDEFAULT} " |
42 |
|
|
43 |
#location to save the started services |
# location to save the started services |
44 |
svcdir="/var/lib/init.d" |
svcdir="/var/lib/init.d" |
45 |
svclib="/lib/rcscripts" |
svclib="/lib/rcscripts" |
46 |
svcmount="no" |
svcmount="no" |
49 |
|
|
50 |
|
|
51 |
# dummy function; needed if splashutils are not installed |
# dummy function; needed if splashutils are not installed |
52 |
splash() { |
splash() { return 0; } |
|
return 0 |
|
|
} |
|
|
|
|
53 |
|
|
54 |
#source splash functions if exists |
# source splash functions if exists |
55 |
[ -f /etc/init.d/splash-functions ] && source /etc/init.d/splash-functions |
[ -f /etc/init.d/splash-functions ] && source /etc/init.d/splash-functions |
56 |
|
|
|
|
|
|
|
|
57 |
print_error_msg() |
print_error_msg() |
58 |
{ |
{ |
59 |
return 0 |
return 0 |
93 |
local SVCD_INITSCRIPT |
local SVCD_INITSCRIPT |
94 |
local x |
local x |
95 |
|
|
|
|
|
96 |
#do this only if proc is mounted |
#do this only if proc is mounted |
97 |
[ ! -f /proc/mounts ] && return 0 |
[ ! -f /proc/mounts ] && return 0 |
98 |
|
|
282 |
else |
else |
283 |
signal=${2##-} |
signal=${2##-} |
284 |
signal=${signal##SIG} |
signal=${signal##SIG} |
|
|
|
285 |
fi |
fi |
286 |
|
|
287 |
getpids $1 |
getpids $1 |
391 |
} |
} |
392 |
|
|
393 |
# searches /proc/mounts for mounted fstypes (like ext3) |
# searches /proc/mounts for mounted fstypes (like ext3) |
394 |
is_fstype_mounted() { |
is_fstype_mounted() |
395 |
|
{ |
396 |
local filesys |
local filesys |
397 |
local i |
local i |
398 |
filesys=$1 |
filesys=$1 |
404 |
} |
} |
405 |
|
|
406 |
# searches /proc/mounts for mounted fs names (like udev, proc) |
# searches /proc/mounts for mounted fs names (like udev, proc) |
407 |
is_fs_mounted() { |
is_fs_mounted() |
408 |
|
{ |
409 |
local filesys |
local filesys |
410 |
local i |
local i |
411 |
filesys=$1 |
filesys=$1 |
417 |
} |
} |
418 |
|
|
419 |
# checks if kernel supports fs xy |
# checks if kernel supports fs xy |
420 |
kernel_supports_fs() { |
kernel_supports_fs() |
421 |
|
{ |
422 |
local filesys |
local filesys |
423 |
local i |
local i |
424 |
filesys=$1 |
filesys=$1 |
435 |
# the reference file |
# the reference file |
436 |
# |
# |
437 |
# EXAMPLE: if is_older_than a.out *.o ; then ... |
# EXAMPLE: if is_older_than a.out *.o ; then ... |
438 |
is_older_than() { |
is_older_than() |
439 |
|
{ |
440 |
local x= |
local x= |
441 |
local ref="$1" |
local ref="$1" |
442 |
shift |
shift |