diff options
Diffstat (limited to 'usr.sbin/tzsetup/tzsetup.c')
-rw-r--r-- | usr.sbin/tzsetup/tzsetup.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c index 8f3f34c..42522b6 100644 --- a/usr.sbin/tzsetup/tzsetup.c +++ b/usr.sbin/tzsetup/tzsetup.c @@ -34,7 +34,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tzsetup.c,v 1.9 1997/11/07 00:07:27 joerg Exp $"; + "$Id: tzsetup.c,v 1.10 1998/01/10 15:55:11 steve Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -631,7 +631,7 @@ usage() int main(int argc, char **argv) { - int c; + int c, fd; while ((c = getopt(argc, argv, "n")) != -1) { switch(c) { @@ -657,10 +657,15 @@ main(int argc, char **argv) "Is this machine's CMOS clock set to UTC? If it is set to local time,\n" "please choose NO here!", 7, 72)) { if (reallydoit) - system("rm -f /etc/wall_cmos_clock"); + unlink(_PATH_WALL_CMOS_CLOCK); } else { - if (reallydoit) - system("touch /etc/wall_cmos_clock"); + if (reallydoit) { + fd = open(_PATH_WALL_CMOS_CLOCK, + O_WRONLY|O_CREAT|O_TRUNC, 0666); + if (fd < 0) + err(1, "create %s", _PATH_WALL_CMOS_CLOCK); + close(fd); + } } dialog_clear_norefresh(); dialog_menu("Time Zone Selector", "Select a region", -1, -1, |