diff options
author | Colin Guthrie <colin@mageia.org> | 2011-11-07 11:22:36 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-11-07 11:22:36 +0000 |
commit | 84c677f03575913899765fc316bfd71e4fb36ede (patch) | |
tree | f4db34e6721311c0c3401ed950ce8df0a376341e /lib | |
parent | d0d4bfab1c372e13d1dd7c5640cdb7574caafdcf (diff) | |
download | drakx-kbd-mouse-x11-84c677f03575913899765fc316bfd71e4fb36ede.tar drakx-kbd-mouse-x11-84c677f03575913899765fc316bfd71e4fb36ede.tar.gz drakx-kbd-mouse-x11-84c677f03575913899765fc316bfd71e4fb36ede.tar.bz2 drakx-kbd-mouse-x11-84c677f03575913899765fc316bfd71e4fb36ede.tar.xz drakx-kbd-mouse-x11-84c677f03575913899765fc316bfd71e4fb36ede.zip |
Ensure we update the default systemd target when setting runlevel.
Diffstat (limited to 'lib')
-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; } |