summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2004-11-04 17:53:15 +0000
committerStew Benedict <stewb@mandriva.org>2004-11-04 17:53:15 +0000
commita26e6245600a6e247d567f6a1b6a549c392ffe9d (patch)
treec1ca5041228eebc3c9509c8f0e78a6d147969b97 /perl-install
parent9b7e00982d96418aba23ce4e79a19d1b28266d26 (diff)
downloaddrakx-backup-do-not-use-a26e6245600a6e247d567f6a1b6a549c392ffe9d.tar
drakx-backup-do-not-use-a26e6245600a6e247d567f6a1b6a549c392ffe9d.tar.gz
drakx-backup-do-not-use-a26e6245600a6e247d567f6a1b6a549c392ffe9d.tar.bz2
drakx-backup-do-not-use-a26e6245600a6e247d567f6a1b6a549c392ffe9d.tar.xz
drakx-backup-do-not-use-a26e6245600a6e247d567f6a1b6a549c392ffe9d.zip
Create cfg dir if needed, ignore vmnet for broadcast address.
Use xorg.conf. Touch dhcp.conf.etherboot.kernel.
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakTermServ20
1 files changed, 11 insertions, 9 deletions
diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ
index b5dce9d55..abbf918f1 100755
--- a/perl-install/standalone/drakTermServ
+++ b/perl-install/standalone/drakTermServ
@@ -54,6 +54,7 @@ $conf{ALLOW_THIN} = 0;
my $nfs_subnet;
my $nfs_mask;
my $cfg_dir = "/etc/drakxtools/draktermserv/";
+-e $cfg_dir or mkdir_p($cfg_dir);
my $cfg_file = $cfg_dir . "draktermserv.conf";
my $interface = get_net_interface();
my $server_ip = get_ip_from_sys();
@@ -488,7 +489,7 @@ sub text_view {
sub help() {
my $inittab_str = '/etc/inittab$$IP=client_ip$$';
my $shadow_str = '/etc/shadow$$CLIENT$$';
- my $xfconfig_str = '/etc/X11/XF86Config-4$$IP=client_ip$$';
+ my $xfconfig_str = '/etc/X11/xorg.conf$$IP=client_ip$$';
text_view(N("Terminal Server Overview") . "\n\n" .
N(" - Create Etherboot Enabled Boot Images:
@@ -1053,20 +1054,20 @@ sub maintain_clients() {
}
sub client_X_keyboard() {
- my $server_conf = "/etc/X11/XF86Config-4";
- my $client_conf = '/etc/X11/XF86Config-4$$CLIENT$$';
+ my $server_conf = "/etc/X11/xorg.conf";
+ my $client_conf = '/etc/X11/xorg.conf$$CLIENT$$';
my @server_X_config = cat_($server_conf);
foreach (@server_X_config) {
chomp;
if (/XkbModel/) {
- my $oldmodel = `grep XkbModel '/etc/X11/XF86Config-4\$\$CLIENT\$\$'`;
+ my $oldmodel = `grep XkbModel '/etc/X11/xorg.conf\$\$CLIENT\$\$'`;
chomp $oldmodel;
my $newmodel = $_;
substInFile { s/$oldmodel/$newmodel/ } $client_conf;
log::explanations("Sync XkbModel in $client_conf from $server_conf");
}
if (/XkbLayout/) {
- my $oldlayout = `grep XkbLayout '/etc/X11/XF86Config-4\$\$CLIENT\$\$'`;
+ my $oldlayout = `grep XkbLayout '/etc/X11/xorg.conf\$\$CLIENT\$\$'`;
chomp $oldlayout;
my $newlayout = $_;
substInFile { s/$oldlayout/$newlayout/ } $client_conf;
@@ -1292,7 +1293,7 @@ sub dhcpd_config() {
}
sub get_net_interface() {
- my @interfaces = `/sbin/route | grep -v lo | tail +3 | awk '{print \$8}' | uniq`;
+ my @interfaces = `/sbin/route | grep -v lo | grep -v vmnet | tail +3 | awk '{print \$8}' | uniq`;
chop @interfaces;
my $count = @interfaces;
if ($count == 1) {
@@ -1535,6 +1536,7 @@ sub start_ts() {
@buff = ();
if (-f $pcimap) {
$buff[0] = "Starting Terminal Server...\n\n";
+ `touch /etc/dhcpd.conf.etherboot.kernel` if ! -f "/etc/dhcpd.conf.etherboot.kernel";
my $buff_index = service_change("dhcpd", "start", 2);
$buff_index = service_change("clusternfs", "start", $buff_index);
$buff[$buff_index] = "\n\tDone!";
@@ -1887,7 +1889,7 @@ sub client_hdw_config {
# make all the local config files
cp_af("/etc/sysconfig/mouse", "/etc/sysconfig/mouse$suffix") if -f "/etc/sysconfig/mouse";
cp_af("/etc/X11/XF86Config", "/etc/X11/XF86Config$suffix") if -f "/etc/X11/XF86Config";
- cp_af('/etc/X11/XF86Config-4$$CLIENT$$', "/etc/X11/XF86Config-4$suffix") if -f '/etc/X11/XF86Config-4$$CLIENT$$';
+ cp_af('/etc/X11/xorg.conf$$CLIENT$$', "/etc/X11/xorg.conf$suffix") if -f '/etc/X11/xorg.conf$$CLIENT$$';
cp_af("/dev/null", "/etc/modules.conf$suffix");
cp_af("/dev/null", "/etc/modules$suffix");
cp_af("/dev/null", "/etc/modprobe.conf$suffix");
@@ -1900,7 +1902,7 @@ sub client_hdw_config {
append_to_file("/etc/exports", "/etc/modprobe.conf$suffix\t$mnt_access\n");
append_to_file("/etc/exports", "/etc/modprobe.preload$suffix\t$mnt_access\n");
append_to_file("/etc/exports", "/etc/X11/XF86Config$suffix\t$mnt_access\n");
- append_to_file("/etc/exports", "/etc/X11/XF86Config-4$suffix\t$mnt_access\n");
+ append_to_file("/etc/exports", "/etc/X11/xorg.conf$suffix\t$mnt_access\n");
} else {
log::explanations("Removing root access for $client_ip");
eval { rm_rf("/etc/shadow\$\$IP=$client_ip\$\$") };
@@ -1938,7 +1940,7 @@ sub clean_client_config {
eval { rm_rf("/etc/modprobe.conf$suffix") };
eval { rm_rf("/etc/modprobe.preload$suffix") };
eval { rm_rf("/etc/X11/XF86Config$suffix") };
- eval { rm_rf("/etc/X11/XF86Config-4$suffix") };
+ eval { rm_rf("/etc/X11/xorg.conf$suffix") };
eval { rm_rf("/etc/sysconfig/network$suffix") };
remove_client_mounts($client_ip);
}