diff options
author | 2004-09-09 18:08:52 +0000 | |
---|---|---|
committer | 2004-09-09 18:08:52 +0000 | |
commit | b1c6157557e313c2806f30c7cc236cf7a94aa2e8 (patch) | |
tree | 937338618c31a48a480be46a21616652b0f66404 /sys-devel/prelink/files | |
parent | Making multilib safe and closing bug #63438. (Manifest recommit) (diff) | |
download | gentoo-2-b1c6157557e313c2806f30c7cc236cf7a94aa2e8.tar.gz gentoo-2-b1c6157557e313c2806f30c7cc236cf7a94aa2e8.tar.bz2 gentoo-2-b1c6157557e313c2806f30c7cc236cf7a94aa2e8.zip |
New Version and add experimental reexec of init
Diffstat (limited to 'sys-devel/prelink/files')
-rw-r--r-- | sys-devel/prelink/files/digest-prelink-20040707 | 1 | ||||
-rw-r--r-- | sys-devel/prelink/files/prelink-20040707-init.patch | 61 |
2 files changed, 62 insertions, 0 deletions
diff --git a/sys-devel/prelink/files/digest-prelink-20040707 b/sys-devel/prelink/files/digest-prelink-20040707 new file mode 100644 index 000000000000..735bb8d06da7 --- /dev/null +++ b/sys-devel/prelink/files/digest-prelink-20040707 @@ -0,0 +1 @@ +MD5 aef688651d417e41d9c75c15f38a35e7 prelink-20040707.tar.bz2 902324 diff --git a/sys-devel/prelink/files/prelink-20040707-init.patch b/sys-devel/prelink/files/prelink-20040707-init.patch new file mode 100644 index 000000000000..55bd8c88ac7e --- /dev/null +++ b/sys-devel/prelink/files/prelink-20040707-init.patch @@ -0,0 +1,61 @@ +--- prelink-20040707/src/main.c.jj 2004-09-09 09:53:05.281838640 -0700 ++++ prelink-20040707/src/main.c 2004-09-09 10:31:09.029656200 -0700 +@@ -58,6 +58,8 @@ + const char *prelink_conf = PRELINK_CONF; + const char *prelink_cache = PRELINK_CACHE; + const char *undo_output; ++int noreexecinit; ++time_t initctime; + + const char *argp_program_version = "prelink 1.0"; + +@@ -111,6 +113,7 @@ + {"mmap-region-end", OPT_MMAP_REG_END, "BASE_ADDRESS", OPTION_HIDDEN, "" }, + {"seed", OPT_SEED, "SEED", OPTION_HIDDEN, "" }, + {"compute-checksum", OPT_COMPUTE_CHECKSUM, 0, OPTION_HIDDEN, "" }, ++ {"init", 'i', 0, 0, "Do not re-execute init" }, + { 0 } + }; + +@@ -222,12 +225,29 @@ + case OPT_COMPUTE_CHECKSUM: + compute_checksum = 1; + break; ++ case 'i': ++ noreexecinit=1; ++ break; + default: + return ARGP_ERR_UNKNOWN; + } + return 0; + } + ++time_t get_ctime(const char *file) { ++ struct stat st; ++ if(stat(file,&st) == 0) ++ return st.st_ctime; ++ return 0; ++} ++ ++void checkinit() { ++ if(initctime != get_ctime("/sbin/init")) { ++ printf("Executing /sbin/init U\n"); ++ system("/sbin/init U"); ++ } ++} ++ + static struct argp argp = { options, parse_opt, "[FILES]", argp_doc }; + + int +@@ -247,6 +267,11 @@ + + argp_parse (&argp, argc, argv, 0, &remaining, 0); + ++ if(!noreexecinit) { ++ initctime = get_ctime("/sbin/init"); ++ atexit(checkinit); ++ } ++ + if (ld_library_path == NULL) + ld_library_path = getenv ("LD_LIBRARY_PATH"); + |