diff --git a/bin/xt-install-image b/bin/xt-install-image index f05c674..843f453 100755 --- a/bin/xt-install-image +++ b/bin/xt-install-image @@ -255,16 +255,9 @@ if ( defined( $CONFIG{ 'install-method' } ) && # # Test that we have some "standard" files present. # - foreach my $file (qw( /bin/ls /bin/cp )) - { - if ( !-x $CONFIG{ 'location' } . $file ) - { - print "The installation of the new system has failed.\n"; - print "\n"; - print "The system is missing the common file: $file\n"; - exit 1; - } - } + + checkForCommonFilesInChroot($CONFIG{ 'location' }, + "installed system"); # # All done. @@ -532,6 +525,30 @@ EOF +=begin doc + + Check if there are some common files in some chroot + +=end doc + +=cut + +sub checkForCommonFilesInChroot { + my ($chroot, $what) = @_; + foreach my $file (qw( /bin/ls /bin/cp )) + { + if ( !-x $chroot.$file ) + { + print STDERR <