|
@@ -1145,6 +1145,21 @@ def main():
|
|
|
|
|
|
options = parse_args()
|
|
options = parse_args()
|
|
|
|
|
|
|
|
+ # Announce startup. Making this is the first log message.
|
|
|
|
+ try:
|
|
|
|
+ logger.info(BIND10_STARTING, VERSION)
|
|
|
|
+ except RuntimeError as e:
|
|
|
|
+ sys.stderr.write('ERROR: failed to write the initial log: %s\n' %
|
|
|
|
+ str(e))
|
|
|
|
+ sys.stderr.write("""\
|
|
|
|
+TIP: if this is about permission error for a lock file, check if the directory
|
|
|
|
+of the file is writable for the user of the bind10 process; often you need
|
|
|
|
+to start bind10 as a super user. Also, if you specify the -u option to
|
|
|
|
+change the user and group, the directory must be writable for the group,
|
|
|
|
+and the created lock file must be writabel for that user.
|
|
|
|
+""")
|
|
|
|
+ sys.exit(1)
|
|
|
|
+
|
|
# Check user ID.
|
|
# Check user ID.
|
|
setuid = None
|
|
setuid = None
|
|
setgid = None
|
|
setgid = None
|
|
@@ -1177,9 +1192,6 @@ def main():
|
|
logger.fatal(BIND10_INVALID_USER, options.user)
|
|
logger.fatal(BIND10_INVALID_USER, options.user)
|
|
sys.exit(1)
|
|
sys.exit(1)
|
|
|
|
|
|
- # Announce startup.
|
|
|
|
- logger.info(BIND10_STARTING, VERSION)
|
|
|
|
-
|
|
|
|
# Create wakeup pipe for signal handlers
|
|
# Create wakeup pipe for signal handlers
|
|
wakeup_pipe = os.pipe()
|
|
wakeup_pipe = os.pipe()
|
|
signal.set_wakeup_fd(wakeup_pipe[1])
|
|
signal.set_wakeup_fd(wakeup_pipe[1])
|