Only use mysqladmin authentication if we have supplied a root password

svn path=/nixos/trunk/; revision=31632
This commit is contained in:
Sander van der Burg 2012-01-18 15:21:11 +00:00
parent d4b6aa3553
commit 1e59a18f90

View file

@ -215,7 +215,7 @@ in
fi
'';
postStop = "${mysql}/bin/mysqladmin --user=root --password=\"$(cat ${cfg.rootPassword})\" shutdown";
postStop = "${mysql}/bin/mysqladmin ${optionalString (cfg.rootPassword != null) "--user=root --password=\"$(cat ${cfg.rootPassword})\""} shutdown";
# !!! Need a postStart script to wait until mysqld is ready to
# accept connections.