diff options
author | jkh <jkh@FreeBSD.org> | 1999-04-28 07:20:11 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-04-28 07:20:11 +0000 |
commit | 090a31925d1c04e2ecdcf80abbee20f1a5d742d6 (patch) | |
tree | 1fc31e07f7dd6902e0f0f523a2e59ddcaa1f7193 /release/sysinstall | |
parent | 3667395a423dfdc7ddd473dc70bd1dc87bdb3748 (diff) | |
download | FreeBSD-src-090a31925d1c04e2ecdcf80abbee20f1a5d742d6.zip FreeBSD-src-090a31925d1c04e2ecdcf80abbee20f1a5d742d6.tar.gz |
Write config files to /usr/share/skel as well as root's profile.
Diffstat (limited to 'release/sysinstall')
-rw-r--r-- | release/sysinstall/config.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c index ec8e497..52e90f2 100644 --- a/release/sysinstall/config.c +++ b/release/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: config.c,v 1.126 1999/04/27 14:33:23 jkh Exp $ + * $Id: config.c,v 1.127 1999/04/28 06:39:25 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -452,17 +452,23 @@ static void write_root_xprofile(char *str) { FILE *fp; + int len; + char **cp; + static char *flist[] = { /* take care of both xdm and startx */ + "/root/.xinitrc", + "/root/.xsession", + "/usr/share/skel/dot.xinitrc", + "/usr/share/skel/dot.xsession", + NULL, + }; - /* take care of both xdm and startx */ - fp = fopen("/root/.xinitrc", "w"); - if (fp) { - fwrite(str, 1, strlen(str), fp); - fclose(fp); - } - fp = fopen("/root/.xsession", "w"); - if (fp) { - fwrite(str, 1, strlen(str), fp); - fclose(fp); + len = strlen(str); + for (cp = flist; *cp; cp++) { + fp = fopen(*cp, "w"); + if (fp) { + fwrite(str, 1, len, fp); + fclose(fp); + } } } |