mirror of
https://github.com/systemd/systemd.git
synced 2024-11-24 10:43:35 +08:00
shutdown: drop -f/-F switches again, simply because we don't want to condone non-ro root dirs
Instead of using /forcefsck and /fastboot people should just kernel command line options to achieve the same.
This commit is contained in:
parent
888c6216ca
commit
f276a41821
@ -146,26 +146,6 @@
|
||||
halt, power-off, reboot.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-f</option></term>
|
||||
|
||||
<listitem><para>Skip file system check
|
||||
on reboot. This is equivalent to
|
||||
creating the
|
||||
<filename>/fastboot</filename> file
|
||||
before going down.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-F</option></term>
|
||||
|
||||
<listitem><para>Force file system
|
||||
check on reboot. This is equivalent to
|
||||
creating the
|
||||
<filename>/forcefsck</filename> file
|
||||
before going down.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-c</option></term>
|
||||
|
||||
|
@ -70,8 +70,6 @@ static bool arg_force = false;
|
||||
static bool arg_defaults = false;
|
||||
static char **arg_wall = NULL;
|
||||
static usec_t arg_when = 0;
|
||||
static bool arg_skip_fsck = false;
|
||||
static bool arg_force_fsck = false;
|
||||
static enum action {
|
||||
ACTION_INVALID,
|
||||
ACTION_SYSTEMCTL,
|
||||
@ -3838,8 +3836,6 @@ static int shutdown_help(void) {
|
||||
" -h Equivalent to --poweroff, overriden by --halt\n"
|
||||
" -k Don't halt/power-off/reboot, just send warnings\n"
|
||||
" --no-wall Don't send wall message before halt/power-off/reboot\n"
|
||||
" -f Skip fsck on reboot\n"
|
||||
" -F Force fsck on reboot\n"
|
||||
" -c Cancel a pending shutdown\n",
|
||||
program_invocation_short_name);
|
||||
|
||||
@ -4215,14 +4211,6 @@ static int shutdown_parse_argv(int argc, char *argv[]) {
|
||||
/* Compatibility nops */
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
arg_skip_fsck = true;
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
arg_force_fsck = true;
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
arg_action = ACTION_CANCEL_SHUTDOWN;
|
||||
break;
|
||||
@ -4812,14 +4800,6 @@ static int halt_main(DBusConnection *bus) {
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
if (arg_force_fsck) {
|
||||
if ((r = touch("/forcefsck")) < 0)
|
||||
log_warning("Failed to create /forcefsck: %s", strerror(-r));
|
||||
} else if (arg_skip_fsck) {
|
||||
if ((r = touch("/fastboot")) < 0)
|
||||
log_warning("Failed to create /fastboot: %s", strerror(-r));
|
||||
}
|
||||
|
||||
if (arg_when > 0) {
|
||||
char *m;
|
||||
char date[FORMAT_TIMESTAMP_MAX];
|
||||
|
Loading…
Reference in New Issue
Block a user