Fixed NetBSD error message for mbuseradd

This commit is contained in:
Michiel Broek 2004-04-05 17:42:29 +00:00
parent 6e421d2bbd
commit 531337c588
3 changed files with 18 additions and 5 deletions

View File

@ -29,6 +29,10 @@ v0.51.3 22-Mar-2003
mblogin: mblogin:
Changed some defines for NetBSD 1.6.2 Changed some defines for NetBSD 1.6.2
mbuseradd:
On NetBSD fixed the errormessage when a new user is
created.
v0.51.2 06-Mar-2004 - 22-Mar-2003 v0.51.2 06-Mar-2004 - 22-Mar-2003

4
TODO
View File

@ -149,10 +149,6 @@ mbaff:
mbindex: mbindex:
X: Add usernames index. X: Add usernames index.
mbnewusr:
L: On NetBSD, supress error message from mbpasswd.
-- Currently no access to my old Sun Sparcstation.
mbsetup: mbsetup:
N: Add a check for double areatag names. N: Add a check for double areatag names.

View File

@ -228,7 +228,7 @@ int main(int argc, char *argv[])
sprintf(shell, "%s/bin/mbsebbs", getenv("MBSE_ROOT")); sprintf(shell, "%s/bin/mbsebbs", getenv("MBSE_ROOT"));
sprintf(homedir, "%s/%s", argv[4], argv[2]); sprintf(homedir, "%s/%s", argv[4], argv[2]);
#if defined(__linux__) || defined(__NetBSD__) #if defined(__linux__)
args[1] = (char *)"-c"; args[1] = (char *)"-c";
args[2] = argv[3]; args[2] = argv[3];
args[3] = (char *)"-d"; args[3] = (char *)"-d";
@ -240,6 +240,19 @@ int main(int argc, char *argv[])
args[9] = argv[2]; args[9] = argv[2];
args[10] = NULL; args[10] = NULL;
#endif #endif
#if defined(__NetBSD__)
args[1] = (char *)"-c";
args[2] = argv[3];
args[3] = (char *)"-d";
args[4] = homedir;
args[5] = (char *)"-g";
args[6] = argv[1];
args[7] = (char *)"-s";
args[8] = shell;
args[9] = (char *)"-m";
args[10] = argv[2];
args[11] = NULL;
#endif
#ifdef __FreeBSD__ #ifdef __FreeBSD__
args[1] = (char *)"useradd"; args[1] = (char *)"useradd";
args[2] = argv[2]; args[2] = argv[2];