@EXPORT_OK = qw();
}
+# -Y off disables any proxy, since there is no point going through the
+# proxy when fetching stuff from the local controller or the local cache.
+our $preseed_wget = 'wget -Y off';
+
#---------- manipulation of Debian bootloader setup ----------
sub debian_boot_setup ($$$$$;$) {
umask 022
mkdir .ssh
-wget -O .ssh/authorized_keys '$authkeys_url'
-wget -O .ssh/known_hosts '$knownhosts_url'
+$preseed_wget -O .ssh/authorized_keys '$authkeys_url'
+$preseed_wget -O .ssh/known_hosts '$knownhosts_url'
u=osstest
h=/home/\$u
set -ex
mkdir -p /target/boot
-wget -Y off -O /target/boot/microcode.cpio $cpio_url
+$preseed_wget -O /target/boot/microcode.cpio $cpio_url
mkdir -p /target/usr/sbin
-wget -Y off -O /target/usr/sbin/osstest-initramfs-gzip $gzip_url
+$preseed_wget -O /target/usr/sbin/osstest-initramfs-gzip $gzip_url
chmod +x /target/usr/sbin/osstest-initramfs-gzip
mkdir -p /target/etc/initramfs-tools/conf.d/
r=/target
-wget -O \$r/tmp/dtbs.tar.gz $durl
+$preseed_wget -O \$r/tmp/dtbs.tar.gz $durl
in-target tar -C /boot -xaf /tmp/dtbs.tar.gz
END
r=/target
-wget -O \$r/tmp/kern.deb $kurl
-wget -O \$r/tmp/initramfs-tools.deb $iurl
+$preseed_wget -O \$r/tmp/kern.deb $kurl
+$preseed_wget -O \$r/tmp/initramfs-tools.deb $iurl
# This will fail due to dependencies...
in-target dpkg -i /tmp/kern.deb /tmp/initramfs-tools.deb || true
my $ix= $#{ $preseed_cmds{$di_key} } + 1;
my $url= create_webfile($ho, "$di_key-$ix$sfx", $text);
my $file= "/tmp/$di_key-$ix";
- my $cmd_cmd= "wget -O $file '$url' && chmod +x $file && $file";
+ my $cmd_cmd= "$preseed_wget -O $file '$url' && chmod +x $file && $file";
push @{ $preseed_cmds{$di_key} }, $cmd_cmd;
}
#!/bin/sh
set -ex
mkdir -p '$installer_dir'
-wget -O '$installer_pathname' '$url'
+$preseed_wget -O '$installer_pathname' '$url'
chmod +x '$installer_pathname'
END
}
umask 022
-wget -O overlay.tar '$url'
+$preseed_wget -O overlay.tar '$url'
cd /target
tar xf \$r/overlay.tar
cd \$r