From: Russ Allbery Date: Fri, 24 Jul 2009 20:18:31 +0000 (-0700) Subject: Turn on --enable-bos-new-config unconditionally X-Git-Tag: openafs-devel-1_5_63~54 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=5dd137c474cc5ffc877bb0655220ad4b2503ed10 Turn on --enable-bos-new-config unconditionally Remove the conditional and Autoconf flag for enabling BosConfig.new handling and change bosserver to always rename BosConfig.new to BosConfig on startup if the former exists. Document BosConfig.new handling in the bosserver and BosConfig man pages. Tone down the warning about the BosConfig file format changing and warn that bosserver rewrites BosConfig when shutting down. Reviewed-on: http://gerrit.openafs.org/211 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/acinclude.m4 b/acinclude.m4 index df3a9b5..ff33b72 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -52,7 +52,6 @@ AH_VERBATIM([OPENAFS_HEADER], #undef AFS_NAMEI_ENV #undef BITMAP_LATER #undef BOS_RESTRICTED_MODE -#undef BOS_NEW_CONFIG #undef FAST_RESTART #undef FULL_LISTVOL_SWITCH #undef COMPLETION_H_EXISTS @@ -111,11 +110,6 @@ AC_ARG_ENABLE([bos-restricted-mode], functionality])], , [enable_bos_restricted_mode="no"]) -AC_ARG_ENABLE([bos-new-config], - [AS_HELP_STRING([--enable-bos-new-config], - [enable bosserver pickup of BosConfig.new on restarts])], - , - [enable_bos_new_config="no"]) AC_ARG_ENABLE([largefile-fileserver], [AS_HELP_STRING([--disable-largefile-fileserver], [disable large file support in fileserver])], @@ -1469,10 +1463,6 @@ if test "$enable_bos_restricted_mode" = "yes"; then AC_DEFINE(BOS_RESTRICTED_MODE, 1, [define if you want to want bos restricted mode]) fi -if test "$enable_bos_new_config" = "yes"; then - AC_DEFINE(BOS_NEW_CONFIG, 1, [define if you want to enable automatic renaming of BosConfig.new to BosConfig at startup]) -fi - if test "$enable_largefile_fileserver" = "yes"; then AC_DEFINE(AFS_LARGEFILE_ENV, 1, [define if you want large file fileserver]) fi diff --git a/doc/man-pages/pod5/BosConfig.pod b/doc/man-pages/pod5/BosConfig.pod index 135cec9..dec4b7e 100644 --- a/doc/man-pages/pod5/BosConfig.pod +++ b/doc/man-pages/pod5/BosConfig.pod @@ -130,11 +130,11 @@ is 5:00 a.m. =back -Although the F file is in ASCII format, do not use a text -editor to alter it. Its format is subject to change and incorrectly -formatted entries can prevent server startup in ways that are difficult to -diagnose. Instead always use the appropriate commands from the B -command suite: +Although the F file is in ASCII format, it is normally best not +to use a text editor to alter it. The parser is very picky, and +incorrectly formatted entries can prevent server startup in ways that are +difficult to diagnose. Instead, use the appropriate commands from the +B command suite: =over 4 @@ -198,6 +198,12 @@ The B command starts a process. =back +When the BOS Server shuts down, it rewrites F, discarding any +changes made manually to that file. To change the configuration for the +next BOS Server restart, instead write a new file to F. If +F exists when the BOS Server starts, it will rename that +file to F before reading its configuration. + =head1 SEE ALSO L, diff --git a/doc/man-pages/pod8/bosserver.pod b/doc/man-pages/pod8/bosserver.pod index 01ac948..aa75e9b 100644 --- a/doc/man-pages/pod8/bosserver.pod +++ b/doc/man-pages/pod8/bosserver.pod @@ -51,6 +51,19 @@ issue commands from the B and B suites. =back +The BOS Server is configured via the F configuration file. +Normally, this file is managed via the B command suite rather than +edited directly. See the L man page for the syntax of this +file. + +The BOS Server will rewrite B when shutting down, so changes +made manually to it will be discarded. Instead, to change the BOS Server +configuration only for the next restart of B, create a file +named F. If B exists when +B starts, it is renamed to F, +removing any existing file by that name, before B reads its +configuration. + The BOS Server logs a default set of important events in the file F. To record the name of any user who performs a privileged B command (one that requires being listed in the diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index 99f6579..4c5159e 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -293,7 +293,6 @@ ReadBozoFile(char *aname) if (code < 0) perror("bosconfig rename"); } -#ifdef BOS_NEW_CONFIG if (access(AFSDIR_SERVER_BOZCONFNEW_FILEPATH, 0) == 0) { code = renamefile(AFSDIR_SERVER_BOZCONFNEW_FILEPATH, @@ -301,7 +300,6 @@ ReadBozoFile(char *aname) if (code < 0) perror("bosconfig rename"); } -#endif } /* setup default times we want to do restarts */