9 |
local webcrlf |
local webcrlf |
10 |
|
|
11 |
# print nothing if quiet mode was requested |
# print nothing if quiet mode was requested |
12 |
[[ ${QUIET} = true ]] && return |
[[ ${QUIET} = 1 ]] && return |
13 |
|
|
14 |
if [[ ${NOCOLORS} = true ]] |
if [[ ${NOCOLORS} = 1 ]] |
15 |
then |
then |
16 |
COLCYAN="" |
COLCYAN="" |
17 |
COLDEFAULT="" |
COLDEFAULT="" |
18 |
fi |
fi |
19 |
|
|
20 |
[[ ${WEBCRLF} = true ]] && webcrlf="<br>" |
[[ ${WEBCRLF} = 1 ]] && webcrlf="<br>" |
21 |
|
|
22 |
# respect -n |
# respect -n |
23 |
case $1 in |
case $1 in |
35 |
local opts |
local opts |
36 |
local webcrlf |
local webcrlf |
37 |
|
|
38 |
if [[ ${NOCOLORS} = true ]] |
if [[ ${NOCOLORS} = 1 ]] |
39 |
then |
then |
40 |
COLRED="" |
COLRED="" |
41 |
COLDEFAULT="" |
COLDEFAULT="" |
42 |
fi |
fi |
43 |
|
|
44 |
[[ ${WEBCRLF} = true ]] && webcrlf="<br>" |
[[ ${WEBCRLF} = 1 ]] && webcrlf="<br>" |
45 |
|
|
46 |
# respect -n |
# respect -n |
47 |
case $1 in |
case $1 in |
48 |
-n) shift; opts="n" ;; |
-n) shift; opts="n" ;; |
49 |
esac |
esac |
50 |
|
|
51 |
echo -e${opts} "${COLRED}$@${COLDEFAULT}${webcrlf}" |
# echo to stderr |
52 |
|
echo -e${opts} "${COLRED}$@${COLDEFAULT}${webcrlf}" 1>&2 |
53 |
} |
} |
54 |
|
|
55 |
# prints return values of get | enabled even in quiet mode |
# prints return values of get | enabled even in quiet mode |
60 |
local opts |
local opts |
61 |
local webcrlf |
local webcrlf |
62 |
|
|
63 |
if [[ ${NOCOLORS} = true ]] |
if [[ ${NOCOLORS} = 1 ]] |
64 |
then |
then |
65 |
COLPURPLE="" |
COLPURPLE="" |
66 |
COLDEFAULT="" |
COLDEFAULT="" |
67 |
fi |
fi |
68 |
|
|
69 |
[[ ${WEBCRLF} = true ]] && webcrlf="<br>" |
[[ ${WEBCRLF} = 1 ]] && webcrlf="<br>" |
70 |
|
|
71 |
# respect -n |
# respect -n |
72 |
case $1 in |
case $1 in |
150 |
# this wrapper runs a command in the xsession of the unpriv_user |
# this wrapper runs a command in the xsession of the unpriv_user |
151 |
x11runas() |
x11runas() |
152 |
{ |
{ |
153 |
if [[ -n $(pidof X) ]] || [[ -n $(pidof Xorg) ]] |
if [[ -n $(pidof X) ]] || [[ -n $(pidof Xorg) ]] || [[ -n $(pidof Xorg.bin) ]] |
154 |
then |
then |
155 |
su - "${MCORE_UNPRIV_USER}" -c "DISPLAY=${MCORE_XORG_DISPLAY} $@" |
su - "${MCORE_UNPRIV_USER}" -c "DISPLAY=${MCORE_XORG_DISPLAY} $@" |
156 |
fi |
fi |
369 |
quit |
quit |
370 |
EOF |
EOF |
371 |
} |
} |
372 |
|
|
373 |
|
nsslsay_queue_init() |
374 |
|
{ |
375 |
|
SSLSAY_QUEUE=() |
376 |
|
} |
377 |
|
|
378 |
|
nsslsay_queue_add() |
379 |
|
{ |
380 |
|
SSLSAY_QUEUE+=( "$@" ) |
381 |
|
} |
382 |
|
|
383 |
|
nsslsay_queue_print() |
384 |
|
{ |
385 |
|
local count |
386 |
|
local i |
387 |
|
|
388 |
|
count="${#SSLSAY_QUEUE[*]}" |
389 |
|
for ((i=0; i < count; i++)) |
390 |
|
do |
391 |
|
echo "${SSLSAY_QUEUE[${i}]}" |
392 |
|
done |
393 |
|
} |
394 |
|
|
395 |
|
nsslsay_queue_run() |
396 |
|
{ |
397 |
|
nsslsay "$(nsslsay_queue_print)" |
398 |
|
} |
399 |
|
|
400 |
|
nsslsay_queue_run_fingerprint() |
401 |
|
{ |
402 |
|
nsslsay_fingerprint "$(nsslsay_queue_print)" |
403 |
|
} |