of CPU indexes.</para></listitem>
</varlistentry>
- <varlistentry>
- <term><varname>MountAuto=yes</varname></term>
- <term><varname>SwapAuto=yes</varname></term>
-
- <listitem><para>Configures whether
- systemd should automatically activate
- all swap or mounts listed in
- <filename>/etc/fstab</filename>, or
- whether this job is left to some other
- system script.</para></listitem>
- </varlistentry>
-
<varlistentry>
<term><varname>DefaultControllers=cpu</varname></term>
" <property name=\"UnitPath\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"NotifySocket\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"ControlGroupHierarchy\" type=\"s\" access=\"read\"/>\n" \
- " <property name=\"MountAuto\" type=\"b\" access=\"read\"/>\n" \
- " <property name=\"SwapAuto\" type=\"b\" access=\"read\"/>\n" \
" <property name=\"DefaultControllers\" type=\"as\" access=\"read\"/>\n" \
" <property name=\"DefaultStandardOutput\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"DefaultStandardError\" type=\"s\" access=\"read\"/>\n" \
{ "UnitPath", bus_property_append_strv, "as", offsetof(Manager, lookup_paths.unit_path), true },
{ "NotifySocket", bus_property_append_string, "s", offsetof(Manager, notify_socket), true },
{ "ControlGroupHierarchy", bus_property_append_string, "s", offsetof(Manager, cgroup_hierarchy), true },
- { "MountAuto", bus_property_append_bool, "b", offsetof(Manager, mount_auto) },
- { "SwapAuto", bus_property_append_bool, "b", offsetof(Manager, swap_auto) },
{ "DefaultControllers", bus_property_append_strv, "as", offsetof(Manager, default_controllers), true },
{ "DefaultStandardOutput", bus_manager_append_exec_output, "s", offsetof(Manager, default_std_output) },
{ "DefaultStandardError", bus_manager_append_exec_output, "s", offsetof(Manager, default_std_error) },
#ifdef HAVE_SYSV_COMPAT
static bool arg_sysv_console = true;
#endif
-static bool arg_mount_auto = true;
-static bool arg_swap_auto = true;
static char **arg_default_controllers = NULL;
static char ***arg_join_controllers = NULL;
static ExecOutput arg_default_std_output = EXEC_OUTPUT_JOURNAL;
#endif
{ "Manager", "CrashChVT", config_parse_int, 0, &arg_crash_chvt },
{ "Manager", "CPUAffinity", config_parse_cpu_affinity2, 0, NULL },
- { "Manager", "MountAuto", config_parse_bool, 0, &arg_mount_auto },
- { "Manager", "SwapAuto", config_parse_bool, 0, &arg_swap_auto },
{ "Manager", "DefaultControllers", config_parse_strv, 0, &arg_default_controllers },
{ "Manager", "DefaultStandardOutput", config_parse_output, 0, &arg_default_std_output },
{ "Manager", "DefaultStandardError", config_parse_output, 0, &arg_default_std_error },
#ifdef HAVE_SYSV_COMPAT
m->sysv_console = arg_sysv_console;
#endif
- m->mount_auto = arg_mount_auto;
- m->swap_auto = arg_swap_auto;
m->default_std_output = arg_default_std_output;
m->default_std_error = arg_default_std_error;
m->runtime_watchdog = arg_runtime_watchdog;
#ifdef HAVE_SYSV_COMPAT
bool sysv_console;
#endif
- bool mount_auto;
- bool swap_auto;
ExecOutput default_std_output, default_std_error;
MountParameters *p;
Unit *tu;
int r;
- bool noauto, nofail, handle, automount;
+ bool noauto, nofail, automount;
assert(m);
automount =
mount_test_option(p->options, "comment=systemd.automount") ||
mount_test_option(p->options, "x-systemd-automount");
- handle =
- automount ||
- mount_test_option(p->options, "comment=systemd.mount") ||
- mount_test_option(p->options, "x-systemd-mount") ||
- UNIT(m)->manager->mount_auto;
if (mount_is_network(p)) {
target = SPECIAL_REMOTE_FS_TARGET;
else /* automount + nofail */
return unit_add_two_dependencies(tu, UNIT_AFTER, UNIT_WANTS, am, true);
- } else if (handle && !noauto) {
+ } else if (!noauto) {
/* Automatically add mount points that aren't natively
* configured to local-fs.target */
pri,
!!mount_test_option(me->mnt_opts, "noauto"),
!!mount_test_option(me->mnt_opts, "nofail"),
- !!mount_test_option(me->mnt_opts, "comment=systemd.swapon"),
false);
} else
k = mount_add_one(m, what, where, me->mnt_opts, me->mnt_type, me->mnt_passno, false, false);
if (!p->noauto &&
!p->nofail &&
- (p->handle || UNIT(s)->manager->swap_auto) &&
s->from_etc_fstab &&
UNIT(s)->manager->running_as == MANAGER_SYSTEM)
if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(s), true)) < 0)
int priority,
bool noauto,
bool nofail,
- bool handle,
bool set_flags) {
Unit *u = NULL;
p->priority = priority;
p->noauto = noauto;
p->nofail = nofail;
- p->handle = handle;
unit_add_to_dbus_queue(u);
if (!(d = udev_device_new_from_devnum(m->udev, 'b', st.st_rdev)))
return -ENOMEM;
- if ((dn = udev_device_get_devnode(d)))
- r = swap_add_one(m, dn, device, prio, false, false, false, set_flags);
+ dn = udev_device_get_devnode(d);
+ if (dn)
+ r = swap_add_one(m, dn, device, prio, false, false, set_flags);
/* Add additional units for all symlinks */
first = udev_device_get_devlinks_list_entry(d);
if ((!S_ISBLK(st.st_mode)) || st.st_rdev != udev_device_get_devnum(d))
continue;
- if ((k = swap_add_one(m, p, device, prio, false, false, false, set_flags)) < 0)
+ k = swap_add_one(m, p, device, prio, false, false, set_flags);
+ if (k < 0)
r = k;
}
udev_device_unref(d);
}
- if ((k = swap_add_one(m, device, device, prio, false, false, false, set_flags)) < 0)
+ k = swap_add_one(m, device, device, prio, false, false, set_flags);
+ if (k < 0)
r = k;
return r;
"%sPriority: %i\n"
"%sNoAuto: %s\n"
"%sNoFail: %s\n"
- "%sHandle: %s\n"
"%sFrom /etc/fstab: %s\n"
"%sFrom /proc/swaps: %s\n"
"%sFrom fragment: %s\n",
prefix, p->priority,
prefix, yes_no(p->noauto),
prefix, yes_no(p->nofail),
- prefix, yes_no(p->handle),
prefix, yes_no(s->from_etc_fstab),
prefix, yes_no(s->from_proc_swaps),
prefix, yes_no(s->from_fragment));
int priority;
bool noauto:1;
bool nofail:1;
- bool handle:1;
} SwapParameters;
typedef enum SwapResult {
extern const UnitVTable swap_vtable;
-int swap_add_one(Manager *m, const char *what, const char *what_proc_swaps, int prio, bool no_auto, bool no_fail, bool handle, bool set_flags);
+int swap_add_one(Manager *m, const char *what, const char *what_proc_swaps, int prio, bool no_auto, bool no_fail, bool set_flags);
int swap_add_one_mount_link(Swap *s, Mount *m);
#SysVConsole=yes
#CrashChVT=1
#CPUAffinity=1 2
-#MountAuto=yes
-#SwapAuto=yes
#DefaultControllers=cpu
#DefaultStandardOutput=journal
#DefaultStandardError=inherit