1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#!/bin/sh
set -e
case "${1}" in
configure)
if ! getent passwd mfs > /dev/null 2>&1; then
adduser_args="--quiet --system --group --disabled-login --no-create-home --home /var/lib/mfs mfs"
## UID consistency of the "mfs" user is helpful to interchange
## HDDs between chunkservers.
## UID for the 400...800 range is produced by the following command:
## perl -E 'srand(unpack q{%C*}, $ARGV[0]); say 400+int(rand(399));' mfs
## Try to create user "mfs" with UID=420:
adduser ${adduser_args} --uid 420 ||\
adduser ${adduser_args}
fi
chown mfs:mfs /var/lib/mfs
;;
esac
#DEBHELPER#
|