
Added a distributedcloud-dcorch.preinst file for creating dcorch user&group. Added or modified a couple of dirs files for creating corresponding log directories: /var/log/dcmanager /var/log/dcorch /var/log/dcdbsync Test Plan: Passed: bring-up of system controller on Debian Story: 2010119 Task: 45699 Signed-off-by: Li Zhu <li.zhu@windriver.com> Change-Id: Id9f62da87a84d97c8761c63386739c6a4c8aec93
32 lines
639 B
Bash
32 lines
639 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# Create group and user for dcorch.conf
|
|
create_user() {
|
|
getent group dcorch >/dev/null || groupadd -r --gid 173 dcorch
|
|
getent passwd dcorch >/dev/null || \
|
|
useradd --uid 173 -r -g dcorch -d /var/lib/dcorch -s /sbin/nologin \
|
|
-c "dcorch Daemons" dcorch
|
|
}
|
|
|
|
case "$1" in
|
|
configure)
|
|
create_user
|
|
;;
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
:
|
|
;;
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|