

Many thx. Worked fine.
If I install a new kernel, I have to recreate the entries with grub-mkconfig -o /boot/grub/grub.cfg
. But do I have to do that also for kernel updates?
I don’t think so, because the filename should not change, if I’m right?
Many thx. Worked fine.
If I install a new kernel, I have to recreate the entries with grub-mkconfig -o /boot/grub/grub.cfg
. But do I have to do that also for kernel updates?
I don’t think so, because the filename should not change, if I’m right?
Ahh ok. Since in this case the script should only run at start and then exit, I use oneshot. Many thx.
Yep, I know. But when I only depend on
After=network-online.target
Wants=network-online.target
this doesn’t mean, I have a working internet connection. That’s why the loop.
Or is that wrong?
What’s the difference between oneshot and simple?
Nice. I will try the systemd unit. Meanwhile, i have added a loop in the script, which helps a little bit:
maxwait=15
if [[ $(nm-online -x) != *"online"* ]]; then
echo "missing internet connection, waiting..."
for (( i = 1; i <= maxwait; ++i )); do
sleep 1 &
echo $i
if [[ $(nm-online -x) == *"online"* ]]; then
break
fi
if [[ $i -eq $maxwait ]]; then
echo "No internet connection"
exit 1
fi
wait
done
fi
In my test, this exits the script after 15 seconds without connection, but continues, when the connection is available or is established within this time.
But i think, its a nice idea, to add this to the script AND use the systemd unit together.
I have one additional question. Sorry. According to the wiki I should use
grub-mkconfig -o /boot/grub/grub.cfg
to generate a new menu after removing or installing other kernels. But obviously/boot/grub/grub.cfg
is wrong, at least for me (the subdir grub doesnt exist here). In my case the file is under/efi/grub/grub.cfg
. Is that also OK? When mounting ESP I followed https://wiki.archlinux.org/title/EFI_system_partition#Mount_the_partition#Typical_mount_points and chose the 2nd variant.