diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-17 09:29:38 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-17 09:29:38 +0000 |
commit | 95758309f394f79ac52a774cd02eb7136346d145 (patch) | |
tree | 6bc627632e961f74c18b46bcf9991a859e55a442 /sys/src/cmd/cwfs/config.c | |
parent | edca9072a5e9c278371960b30bf818f99f0d1430 (diff) |
cwfs: make noauth a storable config option so one can boot without factotum and nvram
Diffstat (limited to 'sys/src/cmd/cwfs/config.c')
-rw-r--r-- | sys/src/cmd/cwfs/config.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/sys/src/cmd/cwfs/config.c b/sys/src/cmd/cwfs/config.c index b11c53e77..49d0ff380 100644 --- a/sys/src/cmd/cwfs/config.c +++ b/sys/src/cmd/cwfs/config.c @@ -440,6 +440,10 @@ mergeconf(Iobuf *p) cp = getwrd(word, cp); if(service[0] == 0) strncpy(service, word, sizeof service); + } else if(strcmp(word, "noauth") == 0){ + noauth = 1; + } else if(strcmp(word, "readonly") == 0){ + readonly = 1; } else if(strcmp(word, "ipauth") == 0) /* obsolete */ cp = getwrd(word, cp); else if(astrcmp(word, "ip") == 0) /* obsolete */ @@ -579,7 +583,10 @@ start: if(fs->conf && fs->conf[0] != '\0') cp = seprint(cp, ep, "filsys %s %s\n", fs->name, fs->conf); - + if(noauth) + cp = seprint(cp, ep, "noauth\n"); + if(readonly) + cp = seprint(cp, ep, "readonly\n"); for (fsp = fspar; fsp->name != nil; fsp++) cp = seprint(cp, ep, "%s %ld\n", fsp->name, fsp->declared); @@ -591,7 +598,7 @@ start: } putbuf(p); - print("service %s\n", service); + print("service %s\n", service); loop: /* @@ -954,12 +961,6 @@ arginit(void) querychanger(iconfig(word)); continue; } - - if(strcmp(word, "allow") == 0) { - wstatallow = 1; - writeallow = 1; - continue; - } if(strcmp(word, "copyworm") == 0) { copyworm = 1; continue; @@ -976,16 +977,18 @@ arginit(void) copydev = 1; continue; } - if(strcmp(word, "noauth") == 0) { - noauth = !noauth; - continue; - } if(strcmp(word, "noattach") == 0) { noattach = !noattach; continue; } + if(strcmp(word, "noauth") == 0) { + noauth = !noauth; + f.modconf = 1; + continue; + } if(strcmp(word, "readonly") == 0) { - readonly = 1; + readonly = !readonly; + f.modconf = 1; continue; } |