• Bug#266499: crosshurd: [patch] setup passive translators from on host s

    From Michael Banck@1:229/2 to All on Wed Aug 18 04:00:10 2004
    From: [email protected]

    Package: crosshurd
    Version: 1.6.9
    Severity: wishlist
    Tags: patch

    The appended patch will try to setfattr the passive translator settings
    if the host system supports extended ext2 attributes. This saves the
    first stage of native-install and lets native-install immediately turn
    to reinstalling the .debs.


    cheers,

    Michael

    --- functions 2004-06-08 22:12:51.000000000 +0200
    +++ functions.new 2004-08-18 03:22:08.000000000 +0200
    @@ -132,3 +132,82 @@
    while echo "$YES" ; do : ; done
    }

    +set_server () {
    + SERVER=$1
    + OWNER=$2
    + PERMS=$3
    + VALUE=$4
    + cd $TARGET/servers
    + if [ ! -e $SERVER ] ; then
    + touch $SERVER
    + chown $OWNER.$OWNER $SERVER
    + chmod $PERMS $SERVER
    + setfattr -n gnu.translator -v "$VALUE" $SERVER
    + fi
    +}
    +
    +set_dev () {
    + DEV_NODE=$1
    + OWNER=$2
    + PERMS=$3
    + VALUE=$4
    + cd $TARGET/dev
    + if [ ! -e $DEV_NODE ] ; then
    + touch $DEV_NODE
    + chown $OWNER.$OWNER $DEV_NODE
    + chmod $PERMS $DEV_NODE
    + setfattr -n gnu.translator -v "$VALUE" $DEV_NODE
    + if [ $DEV_NODE = "fd" ] ; then
    + ln -f -s fd/0 stdin
    + ln -f -s fd/1 stdout
    + ln -f -s fd/2 stderr
    + fi
    + fi
    +}
    +
    +setup_passive_translators () {
    + if [ ! -e $TARGET/servers/exec ] ; then
    + return 2
    + else
    + setfattr -n gnu.translator -v "/hurd/exec\0" $TARGET/servers/exec