ExtraHD bug - can't remove mount point


For what it is worth - I believe you are on the right track!

To me the problem seems to be in the /usr/local/bin/extrahdctrl C program. It doesn’t seem to be returning any error codes.

I did this to prove my theory:

[root@ipfireAPU ~] # cat /var/ipfire/extrahd/bin/extrahd.pl
#!/usr/bin/perl

exit(5);

[root@ipfireAPU ~] # /var/ipfire/extrahd/bin/extrahd.pl
[root@ipfireAPU ~] # echo $?
5

[root@ipfireAPU ~] # /usr/local/bin/extrahdctrl umount /mnt/harddisk
[root@ipfireAPU ~] # echo $?
0

[root@ipfireAPU ~] # 

So no matter what extrahdctrl always returns a “zero”.

The BIG problem is I don’t know C. It’s been 30 years since I tried anything C like…

So maybe instead of:

return run("/var/ipfire/extrahd/bin/extrahd.pl", argv + 1);

this should be:

return system("/var/ipfire/extrahd/bin/extrahd.pl", argv + 1);
#   -or-
return safe_system("/var/ipfire/extrahd/bin/extrahd.pl", argv + 1);

just a wild guess!

Maybe an assist from Michael @ms ??