[Mageia-dev] [soft-commits] [2131] Ensure we update the default systemd target when setting runlevel.

Colin Guthrie cguthrie at mandriva.org
Mon Nov 7 13:54:58 CET 2011


'Twas brillig, and Thierry Vignaud at 07/11/11 12:50 did gyre and gimble:
> On 7 November 2011 12:22,  <root at mageia.org> wrote:
>> Ensure we update the default systemd target when setting runlevel.
> 
> (...)
> 
>> @@ -227,6 +227,12 @@
>>      -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");
>> +	}
> 
> This is bogus, you're including the chroot path in the target path...
> Which will obviously fail then (pointing to eg /mnt/etc/foobar
> instead of /etc/foobar)

Oh ouch! Good catch.

Col

-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list