Closed tux2bsd closed 8 months ago
@rck fyi
hm, you did not take the time to prepare a proper commit (including proper commit messages) but now you assume I should do the work for you? I'm actually not too fond of these "fixing whitspaces" kind of commits either.
back to something more productive: this is a patch I could imagine merging, would that be sufficient for you?
diff --git a/scripts/drbd b/scripts/drbd
index fbed28f2..69d94cb5 100755
--- a/scripts/drbd
+++ b/scripts/drbd
@@ -148,10 +148,14 @@ handle_linstor_loopback()
{
local line dev file loop_mapping
- # new location
- loop_mapping=/var/lib/linstor.d/loop_device_mapping
- # fallback to old location
- [ -f "$loop_mapping" ] || loop_mapping=/var/lib/linstor/loop_device_mapping
+ # new location then fallback to old location
+ if [ -f "/var/lib/linstor.d/loop_device_mapping" ]; then
+ loop_mapping="/var/lib/linstor.d/loop_device_mapping"
+ elif [ -f "/var/lib/linstor/loop_device_mapping" ]; then
+ loop_mapping="/var/lib/linstor/loop_device_mapping"
+ else
+ return 0
+ fi
In general I'm only willing to accept the absolute minimum to this shell nonsense, like it or not, we now have proper systemd unit files and I actually wanted to remove this file for a long time.
@rck you should learn to read, and comprehend. It's not a white space fix, it fixes a bug.
Like I said "please squash" because I'd done my bit quickly via github's web interface which doesn't allow me to squash as the project settings need to allow that (apparently). This is a trivial change, I did the "work" in fixing the bug and testing it and finding out it affected others.
Your bellyaching that you have to do "work" is simply ridiculous. I only tagged you as you had somewhat recent interaction with the file. But it was my misfortune that you, Roland, are an arrogant and maladjusted individual.
closing this nonsense now, will apply my proposed patch after the next release
@rck you're more pathetic than I could imagine.
happy holidays to you as well :partying_face:
Fixes this error (when started via sysvinit):
Starting DRBD resources:/etc/init.d/drbd: line 148: /var/lib/linstor/loop_device_mapping: No such file or directory [
Related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030118
Though in my case I am using Devuan, which is downstream of Debian for most packages (e.g. drbd-utils)
Couple of commits, please squash. I did this quickly only using github's interface... (script tested though) .