Blogs/20070310 openvcp and util vserver 212

Aus Cryptronic
Wechseln zu: Navigation, Suche

Hi all,

at the moment openvcp does not work together with latest util vserver 0.212.

Because of that i wrote a little work around to let openvcp v0.2 work together with util vserver 0.212

Just create a File in /vservers/images named as your image dir .sh

For example if you have a image dir called debian_etch_amd64 the file's name would be debian_etch_amd64.sh

Put the follwing content into the file:

File: /vservers/images/debian_etch_amd64.sh
#!/bin/sh
/usr/bin/perl /vservers/images/change_schedule.pl ${1}

chmod the file to 777 chmod 777 /vservers/images/debian_etch_amd64.sh

You have to do this for every image dir in /vservers/images so that you have at last for each image a .sh skript.

Now create the little perl script which makes the necessary changes for letting vServer start:

File: /vservers/images/change_schedule.pl
#!/usr/bin/perl
use strict;
my @datei;
my $row;
open (IN,"</etc/vservers/".$ARGV[0]."/schedule");
@datei= <IN>;
close IN;

open (OUT,">/etc/vservers/".$ARGV[0]."/schedule");
foreach $row (@datei) {
        if($row =~ /(.*)\.[0-9]+/g) {
                $row = $1."\n";
        }
	elsif($row =~ /dummy/g) {
		$row = "0\n";
	}
        print OUT $row;
}
close OUT;


And be happy your vServer will start correctly.

best ragards

--crypt 11:42, 10. Mär 2007 (CET)

Kommentare

Diskussion:Blogs/20070310 openvcp and util vserver 212

Kommentar hinzufügen

Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
Tipps
Werkzeuge