summaryrefslogtreecommitdiff
blob: db2b926bfc69432da08b4f8c06fed03b9bda8da1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
Index: util-vserver-0.30.210/Makefile.in
===================================================================
--- util-vserver-0.30.210.orig/Makefile.in
+++ util-vserver-0.30.210/Makefile.in
@@ -1230,6 +1230,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BZIP2 = @BZIP2@
 CAT = @CAT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
@@ -1237,6 +1238,7 @@ CFLAGS = @CFLAGS@
 CHOWN = @CHOWN@
 CMP = @CMP@
 CP = @CP@
+CPIO = @CPIO@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CVS2CL = @CVS2CL@
@@ -1277,8 +1279,10 @@ ENV = @ENV@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
+FILE = @FILE@
 GPG_KEY = @GPG_KEY@
 GREP = @GREP@
+GZIP = @GZIP@
 HAVE_CVS2CL_FALSE = @HAVE_CVS2CL_FALSE@
 HAVE_CVS2CL_TRUE = @HAVE_CVS2CL_TRUE@
 HAVE_RCS2LOG_FALSE = @HAVE_RCS2LOG_FALSE@
@@ -1326,6 +1330,7 @@ PS = @PS@
 RANLIB = @RANLIB@
 RCS2LOG = @RCS2LOG@
 RELEASE_CPPFLAGS = @RELEASE_CPPFLAGS@
+RESTORE = @RESTORE@
 RM = @RM@
 RMDIR = @RMDIR@
 RMMOD = @RMMOD@
@@ -1913,11 +1918,13 @@ man_pages = man/chbind.8 \
 			   man/vtop.8
 
 scripts_pkglib_src_DTA = scripts/functions \
+				scripts/magic.mime \
 				scripts/vserver-build.apt-rpm \
 				scripts/vserver-build.skeleton \
 				scripts/vserver-build.debootstrap \
 				scripts/vserver-build.rpm \
 				scripts/vserver-build.yum \
+				scripts/vserver-build.template \
 				scripts/vserver-build.functions \
 				scripts/vserver-build.functions.apt \
 				scripts/vserver-build.functions.rpm \
Index: util-vserver-0.30.210/configure
===================================================================
--- util-vserver-0.30.210.orig/configure
+++ util-vserver-0.30.210/configure
@@ -465,7 +465,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os GPG_KEY CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S ENSC_HAVE_CXX_COMPILER_TRUE ENSC_HAVE_CXX_COMPILER_FALSE ENSC_HAVE_C99_COMPILER_TRUE ENSC_HAVE_C99_COMPILER_FALSE ENSC_PATHPROG_SED CAT CHOWN CMP CP DIRNAME EGREP ENV GREP LN MKDIR MKFIFO MKTEMP MOUNT MV NICE PS RM RMDIR SED SH TAC TAR TOUCH TTY UMOUNT WC IP IPTABLES MODPROBE NAMEIF NOHUP RMMOD VCONFIG WGET DOXYGEN XSLTP XSLTPROC HAVE_XSLTP_TRUE HAVE_XSLTP_FALSE HAVE_XSLTPROC_TRUE HAVE_XSLTPROC_FALSE LIB_DEBUG_CPPFLAGS ENSC_USE_EXPENSIVE_TESTS initrddir RELEASE_CPPFLAGS DIET DIETFLAGS USE_DIETLIBC_TRUE USE_DIETLIBC_FALSE USE_DIETLIBC_COMPAT_TRUE USE_DIETLIBC_COMPAT_FALSE ENSC_USE_DIETLIBC_TRUE ENSC_USE_DIETLIBC_FALSE ENSC_USE_GLIBC_TRUE ENSC_USE_GLIBC_FALSE ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL vserverdir CVS2CL_TAG CVS2CL HAVE_CVS2CL_TRUE HAVE_CVS2CL_FALSE RCS2LOG HAVE_RCS2LOG_TRUE HAVE_RCS2LOG_FALSE ENSC_ENABLE_INTERNAL_HEADERS_TRUE ENSC_ENABLE_INTERNAL_HEADERS_FALSE ENSC_HAVE_BEECRYPT_TRUE ENSC_HAVE_BEECRYPT_FALSE ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os GPG_KEY CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S ENSC_HAVE_CXX_COMPILER_TRUE ENSC_HAVE_CXX_COMPILER_FALSE ENSC_HAVE_C99_COMPILER_TRUE ENSC_HAVE_C99_COMPILER_FALSE ENSC_PATHPROG_SED CAT CHOWN CMP CP DIRNAME EGREP ENV GREP LN MKDIR MKFIFO MKTEMP MOUNT MV NICE PS RM RMDIR SED SH TAC TAR TOUCH TTY UMOUNT WC IP IPTABLES MODPROBE NAMEIF NOHUP RMMOD VCONFIG WGET FILE GZIP BZIP2 CPIO RESTORE DOXYGEN XSLTP XSLTPROC HAVE_XSLTP_TRUE HAVE_XSLTP_FALSE HAVE_XSLTPROC_TRUE HAVE_XSLTPROC_FALSE LIB_DEBUG_CPPFLAGS ENSC_USE_EXPENSIVE_TESTS initrddir RELEASE_CPPFLAGS DIET DIETFLAGS USE_DIETLIBC_TRUE USE_DIETLIBC_FALSE USE_DIETLIBC_COMPAT_TRUE USE_DIETLIBC_COMPAT_FALSE ENSC_USE_DIETLIBC_TRUE ENSC_USE_DIETLIBC_FALSE ENSC_USE_GLIBC_TRUE ENSC_USE_GLIBC_FALSE ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL vserverdir CVS2CL_TAG CVS2CL HAVE_CVS2CL_TRUE HAVE_CVS2CL_FALSE RCS2LOG HAVE_RCS2LOG_TRUE HAVE_RCS2LOG_FALSE ENSC_ENABLE_INTERNAL_HEADERS_TRUE ENSC_ENABLE_INTERNAL_HEADERS_FALSE ENSC_HAVE_BEECRYPT_TRUE ENSC_HAVE_BEECRYPT_FALSE ENSC_CAN_BEECRYPT_WITH_DIETLIBC_TRUE ENSC_CAN_BEECRYPT_WITH_DIETLIBC_FALSE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -6842,6 +6842,411 @@ Can not find the 'wget' tool within '${e
 
 
 
+	if test -z "file"; then
+		rq=true
+	else
+		rq=false
+	fi
+
+	if $rq; then
+		ensc_dflt=
+	else
+		ensc_dflt="file"
+	fi
+
+	for ac_prog in file
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_FILE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $FILE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $ensc_searchpath
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+FILE=$ac_cv_path_FILE
+
+if test -n "$FILE"; then
+  echo "$as_me:$LINENO: result: $FILE" >&5
+echo "${ECHO_T}$FILE" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$FILE" && break
+done
+test -n "$FILE" || FILE="$ensc_dflt"
+
+
+	if test -z "${FILE}" && $rq; then
+		if test -z ""; then
+			{ { echo "$as_me:$LINENO: error: Can not find the 'file' tool within '${ensc_searchpath:-$PATH}'." >&5
+echo "$as_me: error: Can not find the 'file' tool within '${ensc_searchpath:-$PATH}'." >&2;}
+   { (exit 1); exit 1; }; }
+		else
+			{ { echo "$as_me:$LINENO: error:
+Can not find the 'file' tool within '${ensc_searchpath:-$PATH}'.
+" >&5
+echo "$as_me: error:
+Can not find the 'file' tool within '${ensc_searchpath:-$PATH}'.
+" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+	fi
+
+	test "${FILE}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'FILE'@!${FILE}!g;"
+
+	test "${FILE}"
+
+
+
+
+	if test -z "gzip"; then
+		rq=true
+	else
+		rq=false
+	fi
+
+	if $rq; then
+		ensc_dflt=
+	else
+		ensc_dflt="gzip"
+	fi
+
+	for ac_prog in gzip
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GZIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $GZIP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $ensc_searchpath
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+GZIP=$ac_cv_path_GZIP
+
+if test -n "$GZIP"; then
+  echo "$as_me:$LINENO: result: $GZIP" >&5
+echo "${ECHO_T}$GZIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$GZIP" && break
+done
+test -n "$GZIP" || GZIP="$ensc_dflt"
+
+
+	if test -z "${GZIP}" && $rq; then
+		if test -z ""; then
+			{ { echo "$as_me:$LINENO: error: Can not find the 'gzip' tool within '${ensc_searchpath:-$PATH}'." >&5
+echo "$as_me: error: Can not find the 'gzip' tool within '${ensc_searchpath:-$PATH}'." >&2;}
+   { (exit 1); exit 1; }; }
+		else
+			{ { echo "$as_me:$LINENO: error:
+Can not find the 'gzip' tool within '${ensc_searchpath:-$PATH}'.
+" >&5
+echo "$as_me: error:
+Can not find the 'gzip' tool within '${ensc_searchpath:-$PATH}'.
+" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+	fi
+
+	test "${GZIP}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'GZIP'@!${GZIP}!g;"
+
+	test "${GZIP}"
+
+
+
+
+	if test -z "bzip2"; then
+		rq=true
+	else
+		rq=false
+	fi
+
+	if $rq; then
+		ensc_dflt=
+	else
+		ensc_dflt="bzip2"
+	fi
+
+	for ac_prog in bzip2
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_BZIP2+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $BZIP2 in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $ensc_searchpath
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BZIP2="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+BZIP2=$ac_cv_path_BZIP2
+
+if test -n "$BZIP2"; then
+  echo "$as_me:$LINENO: result: $BZIP2" >&5
+echo "${ECHO_T}$BZIP2" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$BZIP2" && break
+done
+test -n "$BZIP2" || BZIP2="$ensc_dflt"
+
+
+	if test -z "${BZIP2}" && $rq; then
+		if test -z ""; then
+			{ { echo "$as_me:$LINENO: error: Can not find the 'bzip2' tool within '${ensc_searchpath:-$PATH}'." >&5
+echo "$as_me: error: Can not find the 'bzip2' tool within '${ensc_searchpath:-$PATH}'." >&2;}
+   { (exit 1); exit 1; }; }
+		else
+			{ { echo "$as_me:$LINENO: error:
+Can not find the 'bzip2' tool within '${ensc_searchpath:-$PATH}'.
+" >&5
+echo "$as_me: error:
+Can not find the 'bzip2' tool within '${ensc_searchpath:-$PATH}'.
+" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+	fi
+
+	test "${BZIP2}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'BZIP2'@!${BZIP2}!g;"
+
+	test "${BZIP2}"
+
+
+
+
+	if test -z "cpio"; then
+		rq=true
+	else
+		rq=false
+	fi
+
+	if $rq; then
+		ensc_dflt=
+	else
+		ensc_dflt="cpio"
+	fi
+
+	for ac_prog in cpio
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_CPIO+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $CPIO in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $ensc_searchpath
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+CPIO=$ac_cv_path_CPIO
+
+if test -n "$CPIO"; then
+  echo "$as_me:$LINENO: result: $CPIO" >&5
+echo "${ECHO_T}$CPIO" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$CPIO" && break
+done
+test -n "$CPIO" || CPIO="$ensc_dflt"
+
+
+	if test -z "${CPIO}" && $rq; then
+		if test -z ""; then
+			{ { echo "$as_me:$LINENO: error: Can not find the 'cpio' tool within '${ensc_searchpath:-$PATH}'." >&5
+echo "$as_me: error: Can not find the 'cpio' tool within '${ensc_searchpath:-$PATH}'." >&2;}
+   { (exit 1); exit 1; }; }
+		else
+			{ { echo "$as_me:$LINENO: error:
+Can not find the 'cpio' tool within '${ensc_searchpath:-$PATH}'.
+" >&5
+echo "$as_me: error:
+Can not find the 'cpio' tool within '${ensc_searchpath:-$PATH}'.
+" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+	fi
+
+	test "${CPIO}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'CPIO'@!${CPIO}!g;"
+
+	test "${CPIO}"
+
+
+
+
+	if test -z "restore"; then
+		rq=true
+	else
+		rq=false
+	fi
+
+	if $rq; then
+		ensc_dflt=
+	else
+		ensc_dflt="restore"
+	fi
+
+	for ac_prog in restore
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_RESTORE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $RESTORE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RESTORE="$RESTORE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $ensc_searchpath
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_RESTORE="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+RESTORE=$ac_cv_path_RESTORE
+
+if test -n "$RESTORE"; then
+  echo "$as_me:$LINENO: result: $RESTORE" >&5
+echo "${ECHO_T}$RESTORE" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$RESTORE" && break
+done
+test -n "$RESTORE" || RESTORE="$ensc_dflt"
+
+
+	if test -z "${RESTORE}" && $rq; then
+		if test -z ""; then
+			{ { echo "$as_me:$LINENO: error: Can not find the 'restore' tool within '${ensc_searchpath:-$PATH}'." >&5
+echo "$as_me: error: Can not find the 'restore' tool within '${ensc_searchpath:-$PATH}'." >&2;}
+   { (exit 1); exit 1; }; }
+		else
+			{ { echo "$as_me:$LINENO: error:
+Can not find the 'restore' tool within '${ensc_searchpath:-$PATH}'.
+" >&5
+echo "$as_me: error:
+Can not find the 'restore' tool within '${ensc_searchpath:-$PATH}'.
+" >&2;}
+   { (exit 1); exit 1; }; }
+		fi
+	fi
+
+	test "${RESTORE}" && ENSC_PATHPROG_SED="${ENSC_PATHPROG_SED}s!@'RESTORE'@!${RESTORE}!g;"
+
+	test "${RESTORE}"
+
+
+
+
 
 	if test -z ":"; then
 		rq=true
@@ -10461,7 +10866,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 10464 "configure"' > conftest.$ac_ext
+  echo '#line 10869 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -11575,7 +11980,7 @@ fi
 
 
 # Provide some information about the compiler.
-echo "$as_me:11578:" \
+echo "$as_me:11983:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -12673,11 +13078,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12676: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13081: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12680: \$? = $ac_status" >&5
+   echo "$as_me:13085: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -12935,11 +13340,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12938: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13343: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12942: \$? = $ac_status" >&5
+   echo "$as_me:13347: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -12997,11 +13402,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13000: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13405: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13004: \$? = $ac_status" >&5
+   echo "$as_me:13409: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14391,7 +14796,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 14394 "configure"' > conftest.$ac_ext
+    echo '#line 14799 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -15266,7 +15671,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 15269 "configure"
+#line 15674 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15364,7 +15769,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 15367 "configure"
+#line 15772 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17619,11 +18024,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17622: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18027: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17626: \$? = $ac_status" >&5
+   echo "$as_me:18031: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17681,11 +18086,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17684: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18089: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17688: \$? = $ac_status" >&5
+   echo "$as_me:18093: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -18204,7 +18609,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 18207 "configure"' > conftest.$ac_ext
+    echo '#line 18612 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -19079,7 +19484,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 19082 "configure"
+#line 19487 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19177,7 +19582,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 19180 "configure"
+#line 19585 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -20062,11 +20467,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20065: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20470: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:20069: \$? = $ac_status" >&5
+   echo "$as_me:20474: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -20124,11 +20529,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:20127: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:20532: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:20131: \$? = $ac_status" >&5
+   echo "$as_me:20536: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -21498,7 +21903,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 21501 "configure"' > conftest.$ac_ext
+    echo '#line 21906 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -22275,11 +22680,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:22278: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:22683: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:22282: \$? = $ac_status" >&5
+   echo "$as_me:22687: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -22537,11 +22942,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:22540: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:22945: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:22544: \$? = $ac_status" >&5
+   echo "$as_me:22949: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -22599,11 +23004,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:22602: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:23007: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:22606: \$? = $ac_status" >&5
+   echo "$as_me:23011: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -23993,7 +24398,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 23996 "configure"' > conftest.$ac_ext
+    echo '#line 24401 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -24868,7 +25273,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 24871 "configure"
+#line 25276 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -24966,7 +25371,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 24969 "configure"
+#line 25374 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -28616,6 +29021,11 @@ s,@NOHUP@,$NOHUP,;t t
 s,@RMMOD@,$RMMOD,;t t
 s,@VCONFIG@,$VCONFIG,;t t
 s,@WGET@,$WGET,;t t
+s,@FILE@,$FILE,;t t
+s,@GZIP@,$GZIP,;t t
+s,@BZIP2@,$BZIP2,;t t
+s,@CPIO@,$CPIO,;t t
+s,@RESTORE@,$RESTORE,;t t
 s,@DOXYGEN@,$DOXYGEN,;t t
 s,@XSLTP@,$XSLTP,;t t
 s,@XSLTPROC@,$XSLTPROC,;t t
Index: util-vserver-0.30.210/configure.ac
===================================================================
--- util-vserver-0.30.210.orig/configure.ac
+++ util-vserver-0.30.210/configure.ac
@@ -56,6 +56,11 @@ ENSC_PATHPROG(NOHUP,     nohup)
 ENSC_PATHPROG(RMMOD,     rmmod)
 ENSC_PATHPROG(VCONFIG,   vconfig,, [See http://www.candelatech.com/~greear/vlan.html; usually this tool is shipped in the 'vconfig' or 'vlan' package of your distribution])
 ENSC_PATHPROG(WGET,      wget)
+ENSC_PATHPROG(FILE,      file,    [file])
+ENSC_PATHPROG(GZIP,      gzip,    [gzip])
+ENSC_PATHPROG(BZIP2,     bzip2,   [bzip2])
+ENSC_PATHPROG(CPIO,      cpio,    [cpio])
+ENSC_PATHPROG(RESTORE,   restore, [restore])
 
 ENSC_PATHPROG(DOXYGEN,   doxygen,  [:])
 ENSC_PATHPROG(XSLTP,     xsltp,    [:])
Index: util-vserver-0.30.210/contrib/manifest.dat.pathsubst
===================================================================
--- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst
+++ util-vserver-0.30.210/contrib/manifest.dat.pathsubst
@@ -8,6 +8,7 @@ build  @PKGLIBDIR@/vserver-build.deboots
 build  @PKGLIBDIR@/vserver-build.yum
 build  @PKGLIBDIR@/vserver-build.rpm
 build  @PKGLIBDIR@/vserver-build.clone
+build  @PKGLIBDIR@/vserver-build.template
 build  @PKGLIBDIR@/vserver-build.functions
 build  @PKGLIBDIR@/vserver-build.functions.apt
 build  @PKGLIBDIR@/vserver-build.functions.rpm
Index: util-vserver-0.30.210/distrib/Makefile.in
===================================================================
--- util-vserver-0.30.210.orig/distrib/Makefile.in
+++ util-vserver-0.30.210/distrib/Makefile.in
@@ -87,6 +87,7 @@ AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
+BZIP2 = @BZIP2@
 CAT = @CAT@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
@@ -94,6 +95,7 @@ CFLAGS = @CFLAGS@
 CHOWN = @CHOWN@
 CMP = @CMP@
 CP = @CP@
+CPIO = @CPIO@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CVS2CL = @CVS2CL@
@@ -134,8 +136,10 @@ ENV = @ENV@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
+FILE = @FILE@
 GPG_KEY = @GPG_KEY@
 GREP = @GREP@
+GZIP = @GZIP@
 HAVE_CVS2CL_FALSE = @HAVE_CVS2CL_FALSE@
 HAVE_CVS2CL_TRUE = @HAVE_CVS2CL_TRUE@
 HAVE_RCS2LOG_FALSE = @HAVE_RCS2LOG_FALSE@
@@ -183,6 +187,7 @@ PS = @PS@
 RANLIB = @RANLIB@
 RCS2LOG = @RCS2LOG@
 RELEASE_CPPFLAGS = @RELEASE_CPPFLAGS@
+RESTORE = @RESTORE@
 RM = @RM@
 RMDIR = @RMDIR@
 RMMOD = @RMMOD@
Index: util-vserver-0.30.210/scripts/Makefile-files
===================================================================
--- util-vserver-0.30.210.orig/scripts/Makefile-files
+++ util-vserver-0.30.210/scripts/Makefile-files
@@ -39,6 +39,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \
 
 scripts_pkglib_src_DTA =	scripts/functions \
 				scripts/gentoo-functions.sh \
+				scripts/magic.mime \
 				scripts/vserver-build.apt-rpm \
 				scripts/vserver-build.skeleton \
 				scripts/vserver-build.debootstrap \
@@ -50,6 +51,7 @@ scripts_pkglib_src_DTA =	scripts/functio
 				scripts/vserver-build.functions.rpm \
 				scripts/vserver-build.functions.pkgmgmt \
 				scripts/vserver-build.functions.yum \
+				scripts/vserver-build.template \
 				scripts/vserver-setup.functions \
 				scripts/vserver.functions \
 				scripts/vserver.start \
Index: util-vserver-0.30.210/scripts/magic.mime
===================================================================
--- /dev/null
+++ util-vserver-0.30.210/scripts/magic.mime
@@ -0,0 +1,19 @@
+# Borrowed from file(1)
+# gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
+0	string		\037\213		application/x-gzip
+# tar posix
+257	string		ustar\0			application/x-tar
+# tar gnu
+257	string		ustar\040\040\0		application/x-tar
+# cpio
+0	short		070707			application/x-cpio
+# cpio swapped
+0	short		0143561			application/x-cpio
+# bzip2
+0	string		BZh			application/x-bzip2
+# dump/restore new-fs big and little endian
+24	belong		60012			application/x-dump
+24	lelong		60012			application/x-dump
+# dump/restore old-fs big and little endian
+24	belong		60011			application/x-dump
+24	lelong		60011			application/x-dump
Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst
===================================================================
--- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst
+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst
@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec"
 _INITSYNC_MINIT_START=:
 _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive"
 _LIB_FUNCTIONS="$__PKGLIBDIR/functions"
+_LIB_MAGIC="$__PKGLIBDIR/magic"
 _LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh"
 _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions"
 _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions"
@@ -103,14 +104,18 @@ _VYUM="$__SBINDIR/vyum"
 _VYUM_WORKER="$__PKGLIBDIR/vyum-worker"
 
 _AWK="@AWK@"
+_BZIP2="@BZIP2@"
 _CAT="@CAT@"
 _CHOWN="@CHOWN@"
 _CMP="@CMP@"
 _CP="@CP@"
+_CPIO="@CPIO@"
 _DIRNAME="@DIRNAME@"
 _EGREP="@EGREP@"
 _ENV="@ENV@"
+_FILE="@FILE@"
 _GREP="@GREP@"
+_GZIP="@GZIP@"
 _IP="@IP@"
 _IPTABLES="@IPTABLES@"
 _LN="@LN@"
@@ -125,6 +130,7 @@ _MV="@MV@"
 _NAMEIF="@NAMEIF@"
 _NICE="@NICE@"
 _NOHUP="@NOHUP@"
+_RESTORE="@RESTORE@"
 _RM="@RM@"
 _RMDIR="@RMDIR@"
 _RMMOD="@RMMOD@"
Index: util-vserver-0.30.210/scripts/vserver-build
===================================================================
--- util-vserver-0.30.210.orig/scripts/vserver-build
+++ util-vserver-0.30.210/scripts/vserver-build
@@ -66,6 +66,8 @@ Possible methods are:
 		     configuration file and calls an optional command then
     debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*]
                      bootstraps the vserver with Debian's 'debootstrap' package
+    template ... -- (-t <tarball>)+
+                ...  installs a guest using tarball(s)
 
 Please report bugs to $PACKAGE_BUGREPORT"
     exit 0
@@ -126,7 +128,7 @@ setup_setDefaults "$VSERVER_NAME"
 
 case x"$method" in
     (xlegacy)	exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;;
-    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone)
+    (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone|xtemplate)
 		. $__PKGLIBDIR/vserver-build.$method
 		;;
     (x)		panic $"No build-method specified";;
Index: util-vserver-0.30.210/scripts/vserver-build.template
===================================================================
--- /dev/null
+++ util-vserver-0.30.210/scripts/vserver-build.template
@@ -0,0 +1,92 @@
+# $Id:$	--*- sh -*--
+
+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+tmp=$(getopt -o '+d:t:' --long debug,pkgmgmt,template: -n "vserver-build.template" -- "$@") || exit 1
+eval set -- "$tmp"
+
+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT"
+
+DISTRIBUTION=:
+use_pkgmgmt=
+declare -a TEMPLATE=()
+while true; do
+    case "$1" in
+	-d)		DISTRIBUTION=$2; shift;;
+	--debug)	set -x;;
+	--pkgmgmt)	use_pkgmgmt=1;;
+	-t|--template)
+			case "$2" in
+			     /*)	f="$2";;
+			     *)		f=`pwd`/"$2";;
+			esac
+			TEMPLATE=( "${TEMPLATE[@]}" "$f" )
+			shift
+			;;
+	--)		shift; break ;;
+	*)		echo "vserver-build.template: internal error: unrecognized option '$1'" >&2
+			exit 1
+			;;
+    esac
+    shift
+done
+
+getDistribution '' 1
+
+base.init
+test -z "$use_pkgmgmt" || pkgmgmt.initVariables
+
+base.initFilesystem "$OPTION_FORCE"
+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE"
+
+
+setup_writeOption "$VSERVER_NAME"
+setup_writeInitialFstab
+
+test -z "$BUILD_INITPRE"  || "$BUILD_INITPRE" "$SETUP_CONFDIR"  "$UTIL_VSERVER_VARS"
+
+pushd "$SETUP_CONFDIR/vdir" >& /dev/null
+for t in "${TEMPLATE[@]}"; do
+    mime=$($_FILE -Nbiz -m "$_LIB_MAGIC" "$t")
+    compression=$(echo "$mime" | $_GREP '(' | $_SED 's!.*(\(.*\))$!\1!')
+
+    case "$compression" in
+	application/x-bzip2)	DECOMPRESS="$_BZIP2 -d -c";;
+	application/x-gzip)	DECOMPRESS="$_GZIP -d -c";;
+	"")			DECOMPRESS=$_CAT;;
+	*)
+	    echo "Unsupported compression method: $compression"
+	    exit 1
+	    ;;
+    esac
+
+    case "$mime" in
+	application/x-tar*)	EXTRACT="$_TAR -x";;
+	application/x-cpio*)	EXTRACT="$_CPIO -i";;
+	application/x-dump*)	EXTRACT="$_RESTORE -rf -";;
+	*)
+	    echo "Unsupported packaging method: $mime"
+	    exit 1
+	    ;;
+    esac
+
+    $DECOMPRESS "$t" | $EXTRACT
+done
+popd >& /dev/null
+
+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS"
+
+base.setSuccess