~dexter/fakechroot/lenny

« back to all changes in this revision

Viewing changes to test/chroot.sh

  • Committer: piotr.roszatycki at gmail
  • Date: 2010-09-12 18:21:38 UTC
  • mfrom: (0.1.7 upstream)
  • Revision ID: piotr.roszatycki@gmail.com-20100912182138-dpjazxgvcscsgd7e
* New upstream release:
  - All Debian patches were applied upstream.
  - Fixed getsockname(2) and getpeername(2) functions and bug when
    "host 127.0.0.1" is called. Closes: #596435.
  - Fixed canonicalize_file_name(3) function and bug when "man-db" command
    is called.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
 
3
srcdir=${srcdir:-.}
 
4
 
3
5
if [ $# -gt 0 ]; then
4
6
    destdir=$1
5
7
    shift
6
8
else
7
 
    destdir=testtree
 
9
    destdir=$srcdir/testtree
8
10
fi
9
11
 
10
12
if [ $# -gt 0 ]; then
11
 
    HOME=/root chroot `pwd`/$destdir "$@"
 
13
    HOME=/root exec /usr/sbin/chroot $destdir "$@"
12
14
else
13
 
    HOME=/root chroot `pwd`/$destdir /bin/bash
 
15
    HOME=/root exec /usr/sbin/chroot $destdir $SHELL
14
16
fi