Log file cleanups
authorGeoff Levand <geoff@infradead.org>
Fri, 9 Mar 2012 02:31:50 +0000 (18:31 -0800)
committerGeoff Levand <geoff@infradead.org>
Fri, 9 Mar 2012 04:51:37 +0000 (20:51 -0800)
Signed-off-by: Geoff Levand <geoff@infradead.org>
discover/pb-discover.c
ui/ncurses/generic-main.c
ui/ncurses/ps3-main.c
ui/twin/main-generic.c
ui/twin/pbt-main.c
utils/pb-udhcpc

index bd515e327cc9c94d75cd0c9ec3eb9de622a553ca..fa1c28ec75ca169f0690740d9358d4a394eff9b2 100644 (file)
@@ -58,7 +58,7 @@ static int opts_parse(struct opts *opts, int argc, char *argv[])
        };
        static const char short_options[] = "hl:V";
        static const struct opts default_values = {
-               .log_file = "pb-discover.log",
+               .log_file = "/var/log/petitboot/pb-discover.log",
        };
 
        *opts = default_values;
index 972490acef49d2bb8e2ee0ecc4974cbbc3f52f15..2d342c3ecbd74c2a93630dacfeff588a0fc6fef5 100644 (file)
 
 static void print_version(void)
 {
-       printf("pb-cui (" PACKAGE_NAME ") " PACKAGE_VERSION "\n");
+       printf("petitboot-nc (" PACKAGE_NAME ") " PACKAGE_VERSION "\n");
 }
 
 static void print_usage(void)
 {
        print_version();
        printf(
-"Usage: pb-cui [-h, --help] [-l, --log log-file] [-V, --version]\n");
+"Usage: petitboot-nc [-h, --help] [-l, --log log-file] [-V, --version]\n");
 }
 
 /**
@@ -78,7 +78,7 @@ static int opts_parse(struct opts *opts, int argc, char *argv[])
        };
        static const char short_options[] = "hl:V";
        static const struct opts default_values = {
-               .log_file = "pb-cui.log",
+               .log_file = "/var/log/petitboot/petitboot-nc.log",
        };
 
        *opts = default_values;
@@ -255,7 +255,7 @@ int main(int argc, char *argv[])
        pb_log_always_flush(1);
 #endif
 
-       pb_log("--- pb-cui ---\n");
+       pb_log("--- petitboot-nc ---\n");
 
        sa.sa_handler = sig_handler;
        result = sigaction(SIGALRM, &sa, NULL);
index d9a66fad74a94ca140d0a916452f5063c61ef0e5..890e47b852221a0c1b04e1519e838ac5a8bbb6e9 100644 (file)
@@ -90,7 +90,7 @@ static int opts_parse(struct opts *opts, int argc, char *argv[])
        };
        static const char short_options[] = "hl:trV";
        static const struct opts default_values = {
-               .log_file = "pb-cui.log",
+               .log_file = "/var/log/petitboot/petitboot-nc.log",
        };
 
        *opts = default_values;
index d314cbcad340f4b3522d05d8c2508875a94ae355..5020fa2f345ff8319a8805f07de400fc3b073379 100644 (file)
@@ -313,7 +313,7 @@ int main(int argc, char *argv[])
        pb_log_always_flush(1);
 #endif
 
-       pb_log("--- pb-twin ---\n");
+       pb_log("--- petitboot-twin ---\n");
 
        sa.sa_handler = sig_handler;
        result = sigaction(SIGALRM, &sa, NULL);
index cc69b4b22362eca5f38af00fb7db5e730e833886..51ff5f2cdf1f85118b9fc7f5559caf78991648cb 100644 (file)
 
 void pbt_print_version(void)
 {
-       printf("pb-twin (" PACKAGE_NAME ") " PACKAGE_VERSION "\n");
+       printf("petitboot-twin (" PACKAGE_NAME ") " PACKAGE_VERSION "\n");
 }
 
 void pbt_print_usage(void)
 {
        pbt_print_version();
        printf(
-"Usage: pb-twin [-h, --help] [-l, --log log-file] [-r, --reset-defaults]\n"
-"               [-t, --timeout] [-V, --version] [[-f --fbdev] | [-x --x11]]\n");
+"Usage: petitboot-twin [-h, --help] [-l, --log log-file]\n"
+"                      [-r, --reset-defaults][-t, --timeout] [-V, --version]"
+"                      [[-f --fbdev] | [-x --x11]]\n");
 }
 
 /**
@@ -57,7 +58,7 @@ int pbt_opts_parse(struct pbt_opts *opts, int argc, char *argv[])
        static const char short_options[] = "fhl:trVx";
        static const struct pbt_opts default_values = {
                .backend = pbt_twin_x11,
-               .log_file = "pb-twin.log",
+               .log_file = "/var/log/petitboot/petitboot-twin.log",
        };
 
        *opts = default_values;
index bc0f759c09c525805c08709ce22d00b01531a249..f15706431ee0e692a6a366ea2cc2131e7e10fdb0 100644 (file)
@@ -7,7 +7,7 @@
 #
 
 PBOOT_USER_EVENT_SOCKET="/tmp/petitboot.ev"
-log="pb-udhcpc.log"
+log="/var/log/petitboot/pb-udhcpc.log"
 
 pb_add () {
        k_server_ip=${rootpath%%:*}