Make vagrant scripts work with bash 3

Fixes #1890
I'm not so sure -- if the string is blank or somehow malformed, a lot of this just ends up creating -1.

```
$ bash -c 'set -o nounset ; prefix=1.1.1. ; ip= ; last=${ip#${prefix}} ; echo $((last - 1))'
-1
```

I'm going to leave the regex in there.  The subtlety isn't from the regex but the mapping of IP to name.