/[sysadmin-cookbook]/recepies/lxc/lxc-debian
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /recepies/lxc/lxc-debian

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 174 by dpavlin, Sat Mar 13 13:21:48 2010 UTC revision 176 by dpavlin, Mon Mar 15 23:09:38 2010 UTC
# Line 95  EOF Line 95  EOF
95      chroot $rootfs /usr/sbin/update-rc.d -f hwclockfirst.sh remove      chroot $rootfs /usr/sbin/update-rc.d -f hwclockfirst.sh remove
96  }  }
97    
98    arch=$(arch)
99    
100  download_debian()  download_debian()
101  {  {
102      packages=\      packages=\
# Line 109  iproute,\ Line 111  iproute,\
111  openssh-server  openssh-server
112    
113      cache=$1      cache=$1
     arch=$2  
114    
115      # check the mini debian was not already downloaded      # check the mini debian was not already downloaded
116      mkdir -p "$cache/partial-$arch"      mkdir -p "$cache/partial-$arch"
# Line 137  openssh-server Line 138  openssh-server
138  copy_debian()  copy_debian()
139  {  {
140      cache=$1      cache=$1
     arch=$2  
141      rootfs=$3      rootfs=$3
142    
143      # make a local copy of the minidebian      # make a local copy of the minidebian
# Line 158  install_debian() Line 158  install_debian()
158              return 1              return 1
159          fi          fi
160    
         arch=$(arch)  
161          if [ "$arch" == "x86_64" ]; then          if [ "$arch" == "x86_64" ]; then
162              arch=amd64              arch=amd64
163          fi          fi
# Line 251  clean() Line 250  clean()
250  usage()  usage()
251  {  {
252      cat <<EOF      cat <<EOF
253  $1 -h|--help -p|--path=<path> --clean  $1 -h|--help -p|--path=<path> -a|--arch=stable --clean
254  EOF  EOF
255      return 0      return 0
256  }  }
257    
258  options=$(getopt -o hp:n:c -l help,path:,name:,clean -- "$@")  options=$(getopt -o hp:n:ca: -l help,path:,name:,clean,arch: -- "$@")
259  if [ $? -ne 0 ]; then  if [ $? -ne 0 ]; then
260          usage $(basename $0)          usage $(basename $0)
261          exit 1          exit 1
# Line 268  do Line 267  do
267      case "$1" in      case "$1" in
268          -h|--help)      usage $0 && exit 0;;          -h|--help)      usage $0 && exit 0;;
269          -p|--path)      path=$2; shift 2;;          -p|--path)      path=$2; shift 2;;
270          -n|--name)      name=$2; shift 2;;                  -n|--name)      name=$2; shift 2;;
271          -c|--clean)     clean=$2; shift 2;;                  -c|--clean)     clean=$2; shift 2;;
272                    -a|--arch)              arch=$2; shift 2;;
273          --)             shift 1; break ;;          --)             shift 1; break ;;
274          *)              break ;;          *)              break ;;
275      esac      esac

Legend:
Removed from v.174  
changed lines
  Added in v.176

  ViewVC Help
Powered by ViewVC 1.1.26