When running shimmed (eg in a docker container), improve process name visible in ps.

This commit is contained in:
Joey Hess 2015-02-16 19:01:32 -04:00
parent 90643c1d98
commit be1a3a7c89
2 changed files with 11 additions and 1 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
propellor (2.1.1) UNRELEASED; urgency=medium
* When running shimmed (eg in a docker container),
improve process name visible in ps.
-- Joey Hess <id@joeyh.name> Mon, 16 Feb 2015 19:00:48 -0400
propellor (2.1.0) unstable; urgency=medium
* Additional tor properties, including support for making relays,

View File

@ -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)