Hi,

+       # update the comment
+       case ${CHOST} in
+       *-freebsd*|*-dragonfly*)
+               pw usermod "${euser}" -c "${ecomment}" && return 0
+               [[ $? == 8 ]] && eerror "${euser} is in use, cannot update 
comment"
+               eerror "There was an error when attempting to update the comment for 
${euser}"
+               eerror "Please update it manually on your system:"
+               eerror "\t pw usermod \"${euser}\" -c \"${ecomment}\""
+               ;;
+
+       *)
+               usermod -c "${ecomment}" "${euser}" && return 0
+               [[ $? == 8 ]] && eerror "${euser} is in use, cannot update 
comment"
+               eerror "There was an error when attempting to update the comment for 
${euser}"
+               eerror "Please update it manually on your system (as root):"
+               eerror "\t usermod -c \"${ecomment}\" \"${euser}\""
+               ;;
+       esac
+}
+
  fi


Those error messages are duplicate and can move to after the case.

You should probably also explicitly return with an error if the case drops through.

Kind Regards,
Jaco



Reply via email to