Devuan fork of gpsd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
596 B

  1. #!/bin/bash
  2. # Very simple wrapper around the DSA version of dchroot
  3. # on the Debian porter boxes. dchroot only accepts one command
  4. # as argument, nothing else. This wrapper creates a temporary script
  5. # which will be executed then.
  6. # This file is Copyright (c) 2010 by the GPSD project
  7. # BSD terms apply: see the file COPYING in the distribution root for details.
  8. dchroot="$1"
  9. shift
  10. command="$1"
  11. shift
  12. arguments="$@"
  13. tmpfile=`mktemp $HOME/XXXXXXXXX.tmp`
  14. cat > $tmpfile << _EOF_
  15. #!/bin/bash
  16. exec $command $arguments
  17. _EOF_
  18. chmod 755 $tmpfile
  19. /usr/bin/dchroot $dchroot $tmpfile
  20. rm -f $tmpfile