Created
December 21, 2018 15:41
-
-
Save holishing/4ebe07f460af90e0e050a8a5e96392c4 to your computer and use it in GitHub Desktop.
Docker volume patch test for PttBBS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/include/common.h b/include/common.h | |
| index 36447c7a..ce806d62 100644 | |
| --- a/include/common.h | |
| +++ b/include/common.h | |
| @@ -14,7 +14,7 @@ | |
| #define FN_CONF_BANIP BBSHOME "/etc/banip.conf" // <B8>T<A4><EE><B3>s<BD>u<AA><BA> IP <A6>C<AA><ED> | |
| // BBS Data File Names | |
| -#define FN_PASSWD BBSHOME "/.PASSWDS" /* User records */ | |
| +#define FN_PASSWD BBSHOME "/index/.PASSWDS" /* User records */ | |
| #define FN_CHICKEN "chicken" | |
| #define FN_USSONG "ussong" /* <C2>I<BA>q<B2><CE><AD>p */ | |
| #define FN_POST_NOTE "post.note" /* po<A4><E5><B3><B9><B3><C6><A7><D1><BF><FD> */ | |
| @@ -33,7 +33,7 @@ | |
| #define FN_USIES "usies" /* BBS log */ | |
| #define FN_DIR ".DIR" | |
| #define FN_DIR_BOTTOM ".DIR.bottom" | |
| -#define FN_BOARD ".BRD" /* board list */ | |
| +#define FN_BOARD "index/.BRD" /* board list */ | |
| #define FN_USEBOARD "usboard" /* <AC><DD><AA>O<B2><CE><AD>p */ | |
| #define FN_TOPSONG "etc/topsong" | |
| #define FN_OVERRIDES "overrides" | |
| diff --git a/util/initbbs.c b/util/initbbs.c | |
| index 3fb46dd3..da482fe9 100644 | |
| --- a/util/initbbs.c | |
| +++ b/util/initbbs.c | |
| @@ -4,6 +4,7 @@ static void initDir() { | |
| Mkdir("adm"); | |
| Mkdir("boards"); | |
| Mkdir("etc"); | |
| + Mkdir("index"); | |
| Mkdir("log"); | |
| Mkdir("man"); | |
| Mkdir("man/boards"); | |
| @@ -78,7 +79,7 @@ static void initManDIR() { | |
| static void initPasswds() { | |
| int i; | |
| userec_t u; | |
| - FILE *fp = fopen(".PASSWDS", "w"); | |
| + FILE *fp = fopen(FN_PASSWD, "w"); | |
| memset(&u, 0, sizeof(u)); | |
| if(fp) { | |
| @@ -99,7 +100,7 @@ static void newboard(FILE *fp, boardheader_t *b) { | |
| } | |
| static void initBoards() { | |
| int i; | |
| userec_t u; | |
| - FILE *fp = fopen(".PASSWDS", "w"); | |
| + FILE *fp = fopen(FN_PASSWD, "w"); | |
| memset(&u, 0, sizeof(u)); | |
| if(fp) { | |
| @@ -99,7 +100,7 @@ static void newboard(FILE *fp, boardheader_t *b) { | |
| } | |
| static void initBoards() { | |
| - FILE *fp = fopen(".BRD", "w"); | |
| + FILE *fp = fopen(FN_BOARD, "w"); | |
| boardheader_t b; | |
| if(fp) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment