From be1a3a7c89ca8ea8aecb9a9748380ef840598171 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 Feb 2015 19:01:32 -0400 Subject: When running shimmed (eg in a docker container), improve process name visible in ps. --- src/Propellor/Shim.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Shim.hs') diff --git a/src/Propellor/Shim.hs b/src/Propellor/Shim.hs index da4c96eb..e1ea2825 100644 --- a/src/Propellor/Shim.hs +++ b/src/Propellor/Shim.hs @@ -33,6 +33,9 @@ setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do let linker = (dest ++) $ fromMaybe (error "cannot find ld-linux linker") $ headMaybe $ filter ("ld-linux" `isInfixOf`) libs' + let linkersym = takeDirectory linker takeFileName propellorbin + createSymbolicLink linkersym (takeFileName linker) + let gconvdir = (dest ++) $ takeDirectory $ fromMaybe (error "cannot find gconv directory") $ headMaybe $ filter ("/gconv/" `isInfixOf`) glibclibs @@ -42,7 +45,7 @@ setup propellorbin propellorbinpath dest = checkAlreadyShimmed propellorbin $ do [ shebang , "GCONV_PATH=" ++ shellEscape gconvdir , "export GCONV_PATH" - , "exec " ++ unwords (map shellEscape $ linker : linkerparams) ++ + , "exec " ++ unwords (map shellEscape $ linkersym : linkerparams) ++ " " ++ shellEscape (fromMaybe propellorbin propellorbinpath) ++ " \"$@\"" ] modifyFileMode shim (addModes executeModes) -- cgit v1.2.3