Renamed --libstatedir to --statedir.
In BSD systems, it's usually </var/db> or some other dir under </var> that is not </var/lib>, so $statedir is a more generic name. See hier(7). Reported-by: Andrei Zeliankou <zelenkov@nginx.com> Reported-by: Zhidao Hong <z.hong@f5.com> Reviewed-by: Konstantin Pavlov <thresh@nginx.com> Reviewed-by: Andrew Clayton <a.clayton@nginx.com> Cc: Liam Crilly <liam@nginx.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
This commit is contained in:
@@ -598,14 +598,14 @@ unit_ctl_welcome()
|
||||
|
||||
# Check unitd is not configured already.
|
||||
echo "$cmd" \
|
||||
| if grep '\--libstatedir' >/dev/null; then
|
||||
| if grep '\--statedir' >/dev/null; then
|
||||
echo "$cmd" \
|
||||
| sed 's/ --/\n--/g' \
|
||||
| grep '\--libstatedir' \
|
||||
| grep '\--statedir' \
|
||||
| cut -d' ' -f2;
|
||||
else
|
||||
$cmd --help \
|
||||
| sed -n '/\--libstatedir/,+1p' \
|
||||
| sed -n '/\--statedir/,+1p' \
|
||||
| grep 'default:' \
|
||||
| sed 's/ *default: "\(.*\)"/\1/';
|
||||
fi \
|
||||
|
||||
Reference in New Issue
Block a user