diff options
-rw-r--r-- | man/systemd.conf.xml | 12 | ||||
-rw-r--r-- | src/core/dbus-manager.c | 4 | ||||
-rw-r--r-- | src/core/main.c | 6 | ||||
-rw-r--r-- | src/core/manager.h | 2 | ||||
-rw-r--r-- | src/core/mount.c | 10 | ||||
-rw-r--r-- | src/core/swap.c | 16 | ||||
-rw-r--r-- | src/core/swap.h | 3 | ||||
-rw-r--r-- | src/core/system.conf | 2 |
8 files changed, 10 insertions, 45 deletions
diff --git a/man/systemd.conf.xml b/man/systemd.conf.xml index d05a30bd48..a110f24541 100644 --- a/man/systemd.conf.xml +++ b/man/systemd.conf.xml @@ -104,18 +104,6 @@ </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> <listitem><para>Configures in which diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index efc626ad87..770fce1209 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -237,8 +237,6 @@ " <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" \ @@ -554,8 +552,6 @@ static const BusProperty bus_manager_properties[] = { { "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) }, diff --git a/src/core/main.c b/src/core/main.c index 290de26022..e9fece8f7d 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -76,8 +76,6 @@ static bool arg_show_status = true; #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; @@ -658,8 +656,6 @@ static int parse_config_file(void) { #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 }, @@ -1427,8 +1423,6 @@ int main(int argc, char *argv[]) { #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; diff --git a/src/core/manager.h b/src/core/manager.h index 20b743ab35..808a0d4286 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -219,8 +219,6 @@ struct Manager { #ifdef HAVE_SYSV_COMPAT bool sysv_console; #endif - bool mount_auto; - bool swap_auto; ExecOutput default_std_output, default_std_error; diff --git a/src/core/mount.c b/src/core/mount.c index dbd4893bcb..e662af0c87 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -325,7 +325,7 @@ static int mount_add_fstab_links(Mount *m) { MountParameters *p; Unit *tu; int r; - bool noauto, nofail, handle, automount; + bool noauto, nofail, automount; assert(m); @@ -343,11 +343,6 @@ static int mount_add_fstab_links(Mount *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; @@ -391,7 +386,7 @@ static int mount_add_fstab_links(Mount *m) { 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 */ @@ -1574,7 +1569,6 @@ static int mount_load_etc_fstab(Manager *m) { 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); diff --git a/src/core/swap.c b/src/core/swap.c index 363852d336..9c30c11bb4 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -182,7 +182,6 @@ static int swap_add_target_links(Swap *s) { 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) @@ -322,7 +321,6 @@ int swap_add_one( int priority, bool noauto, bool nofail, - bool handle, bool set_flags) { Unit *u = NULL; @@ -420,7 +418,6 @@ int swap_add_one( p->priority = priority; p->noauto = noauto; p->nofail = nofail; - p->handle = handle; unit_add_to_dbus_queue(u); @@ -457,8 +454,9 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool 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); @@ -475,14 +473,16 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool 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; @@ -576,7 +576,6 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) { "%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", @@ -586,7 +585,6 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) { 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)); diff --git a/src/core/swap.h b/src/core/swap.h index 5c0ef73026..2a6fceece2 100644 --- a/src/core/swap.h +++ b/src/core/swap.h @@ -53,7 +53,6 @@ typedef struct SwapParameters { int priority; bool noauto:1; bool nofail:1; - bool handle:1; } SwapParameters; typedef enum SwapResult { @@ -109,7 +108,7 @@ struct Swap { 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); diff --git a/src/core/system.conf b/src/core/system.conf index 779ae59963..2b14d3e31e 100644 --- a/src/core/system.conf +++ b/src/core/system.conf @@ -18,8 +18,6 @@ #SysVConsole=yes #CrashChVT=1 #CPUAffinity=1 2 -#MountAuto=yes -#SwapAuto=yes #DefaultControllers=cpu #DefaultStandardOutput=journal #DefaultStandardError=inherit |