diff options
-rw-r--r-- | lib/Xconfig/various.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm index ab077f5..32db2fa 100644 --- a/lib/Xconfig/various.pm +++ b/lib/Xconfig/various.pm @@ -227,6 +227,12 @@ sub runlevel { -r $f or log::l("missing inittab!!!"), return; if ($o_runlevel) { substInFile { s/^id:\d:initdefault:\s*$/id:$o_runlevel:initdefault:\n/ } $f if !$::testing; + my $t = "$::prefix/lib/systemd/system/runlevel$o_runlevel.target"; + if (!$::testing && -f $t) { + my $d = "$::prefix/etc/systemd/system/default.target"; + unlink($d); + symlink($t, "$::prefix/etc/systemd/system/default.target"); + } } else { cat_($f) =~ /^id:(\d):initdefault:\s*$/m && $1; } |