summary refs log tree commit diff
path: root/rvnit.c
diff options
context:
space:
mode:
Diffstat (limited to 'rvnit.c')
-rw-r--r--rvnit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/rvnit.c b/rvnit.c
index 933be5f..26b1446 100644
--- a/rvnit.c
+++ b/rvnit.c
@@ -621,12 +621,14 @@ own_console()
 int
 main(int argc, char *argv[])
 {
-	if (argc < 2) {
-		dprintf(2, "Usage: rvnit DIR\n");
-		exit(2);
-	}
+	if (argc < 1)
+		return 111;
+
+	const char *dir = "/etc/rvnit";
+	if (argc == 2)
+		dir = argv[1];
 
-	if (chdir(argv[1]) < 0) {
+	if (chdir(dir) < 0) {
 		perror("chdir");
 		return 111;
 	}