-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpp.back.aix.func
39 lines (39 loc) · 1.12 KB
/
pp.back.aix.func
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#@ pp_backend_aix_function(func): output one platform-dependent function
pp_backend_aix_function () {
case "$1" in
pp_mkgroup) cat <<'.';;
/usr/sbin/lsgroup "$1" >/dev/null &&
return 0
echo "Creating group $1"
/usr/bin/mkgroup -A "$1"
.
pp_mkuser:depends) echo pp_mkgroup;;
pp_mkuser) cat <<'.';;
/usr/sbin/lsuser "$1" >/dev/null &&
return 0
pp_mkgroup "${2:-$1}" || return 1
echo "Creating user $1"
/usr/bin/mkuser \
login=false \
rlogin=false \
account_locked=true \
home="${3:-/nohome.$1}" \
pgrp="${2:-$1}" \
"$1"
.
pp_havelib) cat <<'.';;
case "$2" in
"") pp_tmp_name="lib$1.so";;
*.*.*) pp_tmp_name="lib$1.so.$2";;
*.*) pp_tmp_name="lib$1.so.$2.0";;
*) pp_tmp_name="lib$1.so.$2";;
esac
for pp_tmp_dir in `echo "/usr/lib:/lib${3:+:$3}" | tr : ' '`; do
test -r "$pp_tmp_dir/$pp_tmp_name" -a \
-r "$pp_tmp_dir/lib$1.so" && return 0
done
return 1
.
*) false;;
esac
}