> diff --git a/debian/condor.postinst b/debian/condor.postinst > index 91ac8a5..0156b7c 100755 > --- a/debian/condor.postinst > +++ b/debian/condor.postinst > @@ -164,8 +164,24 @@ case "$1" in > configure) > # according to > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621833#119 > # this should always work > - adduser --system --group --gecos "$condor_gecos" --home $condor_home > \ > - --disabled-password --disabled-login $condor_user --quiet > + if ! adduser --system --group --gecos "$condor_gecos" --home > $condor_home \ > + --disabled-password --disabled-login $condor_user --quiet ; > then > + # the only time where it would fail, is when there is an existing > + # non-system 'condor' user. This could happen e.g. in a > heterogenous > + # Condor pool (various OSes) where the adminstrative Condor user > + # comes from LDAP and the home dir is shared across machines. > This > + # is a supported deployment scenario for Condor (see installation > + # manual section 3.2) > + # the only problem is the possibility to conflict with an actual > + # "human" user with the same name, so only proceed when the > + # respective user is locked down > + SH=$(getent passwd | egrep '^condor:'| cut -d : -f 7) > + if [ "$SH" = "/bin/false" -o "$SH" = "/usr/sbin/nologin" ]; then > + echo "WARNING: Condor will be running under an existing > non-system user account 'condor'." > + else > + exit 1 > + fi > + fi
This seems OK to me. One last thing may be that instead of 'exit 1' you could have: echo "ERROR: Condor can not run under unlocked non-system account 'condor'" 1>&2 exit 1 so that people know why it is failing. It would be better also to devnull the output of adduser, otherwise you'll get spurious error messages: if ! adduser --system --group --gecos "$condor_gecos" --home $condor_home \ --disabled-password --disabled-login $condor_user --quiet 2>/dev/null; then Thanks, it's great it got solved so fast :) Tiziano -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org