Changeset 2 for openvz-template
- Timestamp:
- 10/05/08 21:56:53 (4 years ago)
- Files:
-
- 1 modified
-
openvz-template/trunk/make-openvz-template (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
openvz-template/trunk/make-openvz-template
r1 r2 1 1 #! /bin/sh 2 2 3 # Simulate that we are running as root if it does not look like that 4 # already. 5 3 6 if [ $(id -u) -ne 0 ]; then 7 PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH" 4 8 exec fakechroot fakeroot "$0" "$@" 5 9 fi 6 10 11 12 # Parse the options 13 14 # Options to pass to debootstrap 15 16 STRAPOPTS="--variant=fakechroot" 17 SUITE="sid" 18 MIRROR="http://ftp.de.debian.org/debian" 19 7 20 while [ $# -ne 0 ]; do 8 21 case "$1" in 9 -x) 22 --make-tarball=*) 23 STRAPOPTS="$STRAPOPTS $1" 10 24 shift 11 DEBOOTSTRAP_OPTS="$1" 25 ;; 26 --unpack-tarball=*) 27 # Work around http://bugs.debian.org/500759 28 STRAPOPTS="$STRAPOPTS --unpack-tarball ${1#--unpack-tarball=}" 29 shift 30 ;; 31 --suite=*) 32 SUITE=${1#--suite=} 12 33 shift 13 34 ;; 14 35 *) 15 echo >&2 "Usage: ..." 16 exit 1 36 if [ $# -eq 1 ]; then 37 TARGET="$1" 38 shift 39 else 40 echo >&2 "Usage: ..." 41 exit 1 42 fi 17 43 ;; 18 44 esac 19 45 done 20 46 21 debootstrap --variant=fakechroot $DEBOOTSTRAP_OPTS 47 48 debootstrap --variant=fakechroot $STRAPOPTS "$SUITE" "$TARGET" "$MIRROR" 49 tar -czf "$TARGET".tar.gz -C "$TARGET" .
![(please configure the [header_logo] section in trac.ini)](/trac/stuff/chrome/site/your_project_logo.png)