← Back to team overview

sslug-teknik team mailing list archive

Re: Java runtime, under ubuntu, med firefox 1.07

 


make-jpkg på debian tester om man er rigtig root og dør hvis man er.
Den forsøger vidst at touche en fil i /etc og ser om det lykkes.

Har lige set efter...


cat $(which make-jpkg)
#!/bin/bash
....
# must be run as root
if ! dh_testroot; then
    exit 1
fi

# check whether I'm real root, and bail out if so... ugly, but needed
if touch /lib/.test 2>/dev/null; then
        rm -f /lib/.test
echo "You are real root -- unfortunately, some Java distributions have" >&2 echo "install scripts that directly manipulate /etc, and may cause some" >&2 echo "inconsistencies on your system. Instead, you should become a" >&2
        echo "non-root user and run:" >&2
        echo >&2
        echo "fakeroot make-jpkg $@" >&2
        echo >&2
echo "which will allow no damage to be done to your system files and" >&2 echo "still permit the Java distribution to successfully extract." >&2
        echo >&2
        echo "Aborting." >&2
        exit 1
fi
...

:o)


Men det er da underligt, at den ikke bare laver nederste test først og så selv starter fakeroot; pakken afhænger endda af den... Men de ved vel hvad de gør...?

\Siemen


Follow ups

References