diff options
-rwxr-xr-x | perl-install/standalone/drakTermServ | 147 | ||||
-rwxr-xr-x | perl-install/standalone/drakbackup | 35 |
2 files changed, 101 insertions, 81 deletions
diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ index 9a0fc48d7..c3c5e8b60 100755 --- a/perl-install/standalone/drakTermServ +++ b/perl-install/standalone/drakTermServ @@ -378,88 +378,93 @@ 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\$\$"; + text_view(N("drakTermServ Overview") . "\n\n" . N(" - Create Etherboot Enabled Boot Images: - To boot a kernel via etherboot, a special kernel/initrd image must be created. - mkinitrd-net does much of this work and drakTermServ is just a graphical interface - to help manage/customize these images. To create the file - /etc/dhcpd.conf.etherboot-pcimap.include that is pulled in as an include in - dhcpd.conf, you should create the etherboot images for at least one full kernel.") . "\n\n" . + To boot a kernel via etherboot, a special kernel/initrd image must be created. + mkinitrd-net does much of this work and drakTermServ is just a graphical + interface to help manage/customize these images. To create the file + /etc/dhcpd.conf.etherboot-pcimap.include that is pulled in as an include in + dhcpd.conf, you should create the etherboot images for at least one full kernel.") . "\n\n" . N(" - Maintain /etc/dhcpd.conf: - To net boot clients, each client needs a dhcpd.conf entry, assigning an IP address - and net boot images to the machine. drakTermServ helps create/remove these entries. + To net boot clients, each client needs a dhcpd.conf entry, assigning an IP + address and net boot images to the machine. drakTermServ helps create/remove + these entries. - (PCI cards may omit the image - etherboot will request the correct image. You should - also consider that when etherboot looks for the images, it expects names like - boot-3c59x.nbi, rather than boot-3c59x.2.4.19-16mdk.nbi). + (PCI cards may omit the image - etherboot will request the correct image. + You should also consider that when etherboot looks for the images, it expects + names like boot-3c59x.nbi, rather than boot-3c59x.2.4.19-16mdk.nbi). - A typical dhcpd.conf stanza to support a diskless client looks like:") . "\n\n" . -" host curly { - hardware ethernet 00:20:af:2f:f7:9d; - fixed-address 192.168.192.3; - #type fat; - filename \"i386/boot/boot-3c509.2.4.18-6mdk.nbi\"; - #hdw_config true; - } + A typical dhcpd.conf stanza to support a diskless client looks like:") . "\n\n" . +" host curly { + hardware ethernet 00:20:af:2f:f7:9d; + fixed-address 192.168.192.3; + #type fat; + filename \"i386/boot/boot-3c509.2.4.18-6mdk.nbi\"; + #hdw_config true; + } " . "\n" . -N(" While you can use a pool of IP addresses, rather than setup a specific entry for - a client machine, using a fixed address scheme facilitates using the functionality - of client-specific configuration files that ClusterNFS provides. +N(" While you can use a pool of IP addresses, rather than setup a specific entry for + a client machine, using a fixed address scheme facilitates using the functionality + of client-specific configuration files that ClusterNFS provides. - Note: The \"#type\" entry is only used by drakTermServ. Clients can either be 'thin' - or 'fat'. Thin clients run most software on the server via xdmcp, while fat clients run - most software on the client machine. A special inittab, /etc/inittab\$\$IP=client_ip\$\$ is - written for thin clients. System config files xdm-config, kdmrc, and gdm.conf are - modified if thin clients are used, to enable xdmcp. Since there are security issues in - using xdmcp, hosts.deny and hosts.allow are modified to limit access to the local - subnet. + Note: The '#type' entry is only used by drakTermServ. Clients can either be 'thin' + or 'fat'. Thin clients run most software on the server via xdmcp, while fat clients run + most software on the client machine. A special inittab, %s is + written for thin clients. System config files xdm-config, kdmrc, and gdm.conf are + modified if thin clients are used, to enable xdmcp. Since there are security issues in + using xdmcp, hosts.deny and hosts.allow are modified to limit access to the local + subnet. - Note: The \"#hdw_config\" entry is also only used by drakTermServ. Clients can either - be 'true' or 'false'. 'true' enables root login at the client machine and allows local - hardware configuration of sound, mouse, and X, using the 'drak' tools. This is enabled - by creating separate config files associated with the client's IP address and creating - read/write mount points to allow the client to alter the file. Once you are satisfied - with the configuration, you can remove root login privileges from the client. + Note: The '#hdw_config' entry is also only used by drakTermServ. Clients can either + be 'true' or 'false'. 'true' enables root login at the client machine and allows local + hardware configuration of sound, mouse, and X, using the 'drak' tools. This is enabled + by creating separate config files associated with the client's IP address and creating + read/write mount points to allow the client to alter the file. Once you are satisfied + with the configuration, you can remove root login privileges from the client. - Note: You must stop/start the server after adding or changing clients.") . "\n\n" . + Note: You must stop/start the server after adding or changing clients.", $inittab_str) . "\n\n" . N(" - Maintain /etc/exports: - Clusternfs allows export of the root filesystem to diskless clients. drakTermServ - sets up the correct entry to allow anonymous access to the root filesystem from - diskless clients. + Clusternfs allows export of the root filesystem to diskless clients. drakTermServ + sets up the correct entry to allow anonymous access to the root filesystem from + diskless clients. - A typical exports entry for clusternfs is: + A typical exports entry for clusternfs is: - / (ro,all_squash) - /home SUBNET/MASK(rw,root_squash) + / (ro,all_squash) + /home SUBNET/MASK(rw,root_squash) - With SUBNET/MASK being defined for your network.") . + With SUBNET/MASK being defined for your network.") . "\n\n" . -N(" - Maintain /etc/shadow\$\$CLIENT\$\$: - For users to be able to log into the system from a diskless client, their entry in - /etc/shadow needs to be duplicated in /etc/shadow\$\$CLIENTS\$\$. drakTermServ helps - in this respect by adding or removing system users from this file.") . "\n\n" . -N(" - Per client /etc/X11/XF86Config-4\$\$IP-ADDRESS\$\$: - Through clusternfs, each diskless client can have its own unique configuration files - on the root filesystem of the server. By allowing local client hardware configuration, - drakTermServ will help create these files.") . +N(" - Maintain %s: + For users to be able to log into the system from a diskless client, their entry in + /etc/shadow needs to be duplicated in %s. drakTermServ + helps in this respect by adding or removing system users from this file.", $shadow_str, $shadow_str) . "\n\n" . +N(" - Per client %s: + Through clusternfs, each diskless client can have its own unique configuration files + on the root filesystem of the server. By allowing local client hardware configuration, + drakTermServ will help create these files.", $xfconfig_str) . "\n\n" . N(" - Per client system configuration files: - Through clusternfs, each diskless client can have its own unique configuration files - on the root filesystem of the server. By allowing local client hardware configuration, - clients can customize files such as /etc/modules.conf, /etc/sysconfig/mouse, - /etc/sysconfig/keyboard on a per-client basis. + Through clusternfs, each diskless client can have its own unique configuration files + on the root filesystem of the server. By allowing local client hardware configuration, + clients can customize files such as /etc/modules.conf, /etc/sysconfig/mouse, + /etc/sysconfig/keyboard on a per-client basis. Note: Enabling local client hardware configuration does enable root login to the terminal - server on each client machine that has this feature enabled. Local configuration can be turned - back off, retaining the configuration files, once the client machine is configured.") . "\n\n" . + server on each client machine that has this feature enabled. Local configuration can be + turned back off, retaining the configuration files, once the client machine is configured.") . "\n\n" . N(" - /etc/xinetd.d/tftp: - drakTermServ will configure this file to work in conjunction with the images created by - mkinitrd-net, and the entries in /etc/dhcpd.conf, to serve up the boot image to each - diskless client. + drakTermServ will configure this file to work in conjunction with the images created + by mkinitrd-net, and the entries in /etc/dhcpd.conf, to serve up the boot image to + each diskless client. - A typical tftp configuration file looks like: + A typical tftp configuration file looks like: - service tftp + service tftp { disable = no socket_type = dgram @@ -468,20 +473,20 @@ N(" - /etc/xinetd.d/tftp: user = root server = /usr/sbin/in.tftpd server_args = -s /var/lib/tftpboot - } + } - The changes here from the default installation are changing the disable flag to - 'no' and changing the directory path to /var/lib/tftpboot, where mkinitrd-net - puts its images.") . "\n\n" . + The changes here from the default installation are changing the disable flag to + 'no' and changing the directory path to /var/lib/tftpboot, where mkinitrd-net + puts its images.") . "\n\n" . N(" - Create etherboot floppies/CDs: - The diskless client machines need either ROM images on the NIC, or a boot floppy - or CD to initate the boot sequence. drakTermServ will help generate these images, - based on the NIC in the client machine. + The diskless client machines need either ROM images on the NIC, or a boot floppy + or CD to initate the boot sequence. drakTermServ will help generate these + images, based on the NIC in the client machine. - A basic example of creating a boot floppy for a 3Com 3c509 manually: + A basic example of creating a boot floppy for a 3Com 3c509 manually: - cat /usr/lib/etherboot/boot1a.bin \\ - /usr/lib/etherboot/lzrom/3c509.lzrom > /dev/fd0") . "\n\n"); + cat /usr/lib/etherboot/boot1a.bin \\ + /usr/lib/etherboot/lzrom/3c509.lzrom > /dev/fd0") . "\n\n"); } sub make_boot() { diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index 93841301e..f6339aee1 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -431,7 +431,7 @@ sub all_user_list() { while (defined(my $line = <PASSWD>)) { chomp($line); ($user, $uid) = (split(/:/, $line))[0, 2]; - if ($uid >= 500 || $uid == 0) { + if ($uid >= 500 && $uid < 65000 || $uid == 0) { push @user_list_all, $user; } } @@ -601,7 +601,15 @@ sub get_cd_info() { sub save_conf_file() { write_sitecopyrc() if $net_proto eq 'webdav'; write_password_file() if $net_proto eq 'rsync' && $passwd_user; - + if (!$backup_daemon) { + $when_space = ""; + $daemon_media = ""; + } + if (@user_list == ()) { + $backup_user = 0; + } else { + $backup_user = 1; + } my @cfg_list = ("SYS_FILES=@sys_files\n", "HOME_FILES=@user_list\n", "OTHER_FILES=@list_other\n", @@ -624,7 +632,7 @@ sub save_conf_file() { $backup_user_versions and push @cfg_list, "USER_INCREMENTAL_BACKUPS\n"; $backup_other_versions and push @cfg_list, "OTHER_INCREMENTAL_BACKUPS\n"; $sys_diff_mode and $backup_sys_versions and push @cfg_list, "SYS_DIFFERENTIAL_BACKUPS\n"; - $user_diff_mode and $backup_user_versions and push @cfg_list, "USER_DIFFERENTIAL_BACKUPS\n"; + $backup_user and $user_diff_mode and $backup_user_versions and push @cfg_list, "USER_DIFFERENTIAL_BACKUPS\n"; $other_diff_mode and $backup_other_versions and push @cfg_list, "OTHER_DIFFERENTIAL_BACKUPS\n"; $media_erase and push @cfg_list, "MEDIA_ERASE\n"; $media_eject and push @cfg_list, "MEDIA_EJECT\n"; @@ -655,6 +663,7 @@ sub save_conf_file() { $dvdram and push @cfg_list, "DVDRAM\n"; $what_no_browser or push @cfg_list, "BROWSER_CACHE\n"; $backup_sys or push @cfg_list, "NO_SYS_FILES\n"; + $backup_user or push @cfg_list, "NO_USER_FILES\n"; if ($comp_mode) { push @cfg_list, "OPTION_COMP=TAR.BZ2\n"; } else { @@ -758,7 +767,7 @@ sub read_conf_file() { next if /^#/; chomp; if (/^SYS_FILES/) { s/^SYS_FILES=//gi; @sys_files = split(' ', $_) } - if (/^HOME_FILES/) { s/^HOME_FILES=//gi; @user_list = split(' ', $_) } + if (/^HOME_FILES/) { s/^HOME_FILES=//gi; @user_list = split(' ', $_); $backup_user = 1 } if (/^OTHER_FILES/) { s/^OTHER_FILES=//gi; @list_other = split(' ', $_) } if (/^PATH_TO_SAVE/) { s/^PATH_TO_SAVE=//gi; $save_path = $_ } if (/^NO_SYS_FILES/) { $backup_sys = 0 } @@ -2537,7 +2546,7 @@ sub advanced_when() { 'weekly' => N("weekly"), 'monthly' => N("monthly"), 'custom' => N("custom")); - $combo_when_space->set_popdown_strings(N("hourly"), N("daily"), N("weekly"), N("monthly"), N("custom")); + $combo_when_space->set_popdown_strings("", N("hourly"), N("daily"), N("weekly"), N("monthly"), N("custom")); set_help_tip($combo_when_space, 'when_space'); #- custom setup - let user specify month, day of month, day of week, hour, minute @@ -2578,7 +2587,7 @@ sub advanced_when() { #- drop down list of possible media - default to config value my $entry_media_type = new Gtk2::OptionMenu(); - $entry_media_type->set_popdown_strings(@media_types, @net_methods); + $entry_media_type->set_popdown_strings("", @media_types, @net_methods); $entry_media_type->entry->set_text($daemon_media); gtkpack($advanced_box, @@ -2877,7 +2886,12 @@ sub wizard() { my $box2; my $user_string = N("Backup Users"); $user_string .= N(" (Default is all users)") if !$nonroot_user; - + if ($backup_user) { + @user_list = @user_list_all; + } else { + @user_list = (); + } + gtkpack($advanced_box, $box2 = gtkpack_(new Gtk2::HBox(0, 15), 1, new Gtk2::VBox(0, 5), @@ -2988,8 +3002,8 @@ sub system_state() { } #- tape and CDRW share some features - my $erase_media = 'NO'; - $erase_media = 'YES' if $media_erase && ($where_cd || $where_tape); + my $erase_media = N("NO"); + $erase_media = N("YES") if $media_erase && ($where_cd || $where_tape); $where_cd and $system_state .= N("\n- Burn to CD"); $where_cd and $cdrw and $system_state .= N("RW"); $where_cd and $system_state .= N(" on device: %s", $cd_device); @@ -3012,7 +3026,7 @@ sub system_state() { $system_state .= N("\tUse .backupignore files\n") if $backupignore; $system_state .= N("\tSend mail to %s\n", $user_mail) if $user_mail; - $daemon_media and $system_state .= N("\n- Daemon (%s) include:\n", $when_space); + $daemon_media and $system_state .= N("\n- Daemon, %s via:\n", $when_space); $daemon_media eq 'hd' and $system_state .= N("\t-Hard drive.\n"); $daemon_media eq 'cd' and $system_state .= N("\t-CD-R.\n"); $daemon_media eq 'tape' and $system_state .= N("\t-Tape \n"); @@ -4957,6 +4971,7 @@ sub build_backup_box_see_conf { my ($caller) = @_; my $box2; my $text = new Gtk2::TextView; + read_conf_file(); system_state(); gtktext_insert($text, [ [ $system_state ] ]); button_box_restore_main(); |