Fix bug where the store couldn't bind to port 689 on setup

This commit is contained in:
alexhudson
2007-06-27 12:23:05 +00:00
parent 0c3bcc6e99
commit ac0aea9c83
+7 -2
View File
@@ -438,8 +438,6 @@ main(int argc, char *argv[]) {
return 1;
}
RunAsBongoUser();
// parse options
while (++next_arg < argc && argv[next_arg][0] == '-') {
char *arg = argv[next_arg];
@@ -476,11 +474,13 @@ main(int argc, char *argv[]) {
usage();
}
// unusual libgcrypt options must occur before XplInit()
if (command == 2) {
gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
}
XplInit();
// we don't want to setup libraries unless we need to (e.g., to run an agent)
if (command == 1) {
startup = BA_STARTUP_CONNIO;
if (-1 == BongoAgentInit(&configtool, "bongoconfig", "", DEFAULT_CONNECTION_TIMEOUT, startup)) {
@@ -489,6 +489,11 @@ main(int argc, char *argv[]) {
}
}
// don't give away privileges if we're going to need them later.
if (command != 1) {
RunAsBongoUser();
}
switch(command) {
case 1:
InitialStoreConfiguration();