On 10/25/18 6:00 AM, Thomas Goirand wrote: > On 10/25/18 3:16 AM, Jesse Smith wrote: >> I believe I found the problem here >> [...] > Can you provide a patch then? > >
Short answer: No, I don't think so because the concept of the init scripts and related defaults prevent the user from doing what the reporting user is trying to do. The init.d scripts, so far as I know, don't expect parameters which is why the "defaults" files exist. Long answer: The script is basically set up to work on auto-pilot and use /etc/default/halt as the only way to pass in parameters. If the user runs "halt -p -i", for example, the arguments are stripped away by the time the script calls "/sbin/halt". I don't think the user's command line arguments get passed to the script. (Someone please correct me if I'm wrong, but it looks like none of the init.d scripts accept parameters from the user.) Which means the user needs to set expected behaviour in the /etc/default/halt file, which is what Debian supports. This seems to be a limitation by design to keep things streamlined and consistent. If the user wants to poweroff instead of simply halt, they need to edit /etc/default/halt first. The user is basically reporting, in the above situation, that they change the default behaviour, but then want to change it back using another method and I don't think Debian's approach supports that. They should just switch the default parameter back and then call halt normally. Alternatively, the user can edit the /etc/init.d/halt file directly and put a "-p" at the end of the command, but that will get overwritten by future updates and it would run counter to the default behaviour they specified in the first place. Basically, everything is working "as expected", it's just that the init.d scripts do not (as far as I know) accept command line arguments from the end user.