I am impressed with BOA.

This section checks whether a new octopus name exists in /etc/passwd.

(line 1310 onwards in https://github.com/omega8cc/nginx-for-drupal/blob/master/OCTOPUS.sh.txt)

  _FREEID=`cat /etc/passwd | cut -d: -f1 | awk '{ print $1}' | grep $_USER`
  if [ ! -z "$_FREEID" ] ; then
    msg "ERROR: $_USER is already used or too similar to an existing username"
    msg "Please choose different _USER"
    exit 1
  fi

I tried "ex", which matched "debian-exim" and threw an error. There is nothing similar between those two.

How about matching on word boundaries instead?

Also, this check happens halfway through the whole upgrade/install process. Can we move checks to the start of the boa process?

Then I won't have to wait 5 minutes to find out my name is no good.

Comments

omega8cc’s picture

Category: task » bug

Good catch, thanks. This check is pretty ugly and we should use something like this instead.

omega8cc’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.