X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/blobdiff_plain/de764601948905c8a591e477cbe6c9b3774f115f..de907bb6833d4160ff7690e78355ec722e451092:/files/rc.local?ds=inline diff --git a/files/rc.local b/files/rc.local index 47dde6a..e6f9c6d 100755 --- a/files/rc.local +++ b/files/rc.local @@ -12,6 +12,7 @@ my $firmware_tarball = '/boot/efi/linux-firmware.tar'; my $firmware_manifest = '/lib/firmware/ASAHI_FIRMWARE_MANIFEST'; +my $grubcfg = '/mnt/EFI/debian/grub.cfg'; sub find_root_device @@ -58,8 +59,8 @@ find_efi_parition for my $dev (@candidates) { system("mount -o ro $dev /mnt"); - if (-f '/mnt/EFI/boot/grub.cfg') { - open(GRUBCFG, '<', '/mnt/EFI/boot/grub.cfg') || die ("Can't open /mnt/EFI/boot/grub.cfg: $!"); + if (-f $grubcfg) { + open(GRUBCFG, '<', $grubcfg) || die ("Can't open $grubcfg: $!"); my @lines = ; for (@lines) { if (/${uuid_in_grub_cfg}/) { @@ -85,7 +86,6 @@ generate_fstab open(FSTAB, '>', '/etc/fstab') || die ("Can not open fstab"); print FSTAB <