Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That just highlights the biggest problem with python in an init.d script -- added complexity. </p> <p>Python has no specification, and the env doesn't even have to point to cpython. If you upgrade and python breaks, you'll have to bite your tongue. And there is a much greater chance that python will break than sh (the safe bet for init.d scripts). Reason being, simple utility:</p> <pre> ecarroll@x60s:/etc/init.d$ ldd /usr/bin/python linux-gate.so.1 => (0xb7ff7000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7fc9000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7fc5000) libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0xb7fc0000) libz.so.1 => /lib/libz.so.1 (0xb7faa000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f84000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e21000) /lib/ld-linux.so.2 (0xb7ff8000) ecarroll@x60s:/etc/init.d$ ldd /bin/sh linux-gate.so.1 => (0xb803f000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7ec7000) /lib/ld-linux.so.2 (0xb8040000) </pre> <p>Python is linking into libpthread, libdl, libutil, libz, libm amongst other things that can possibly break. Python is simply doing more.</p> <pre> -rwxr-xr-x 1 root root 86K 2008-11-05 01:51 /bin/dash -rwxr-xr-x 1 root root 2.2M 2009-04-18 21:53 /usr/bin/python2.6 </pre> <p>You can read up more about what you're specifically talking about with env variables here: <a href="http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.9" rel="nofollow noreferrer">http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.9</a> The main problem is that the defaults for env can be set in /etc/profile which would only run if the script is being run under a shell that supports reading it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload