diff -ruN ltspcfg-0.6/ChangeLog ltspcfg-0.7/ChangeLog
--- ltspcfg-0.6/ChangeLog	2004-04-23 14:35:12.000000000 +0200
+++ ltspcfg-0.7/ChangeLog	2004-07-02 15:42:18.000000000 +0200
@@ -1,5 +1,12 @@
 
-Fri Apr 23 14:23:21 2004 Emiliano Gabrielli
+Tue Apr 27 14:32:19 2004 Emiliano Gabrielli <AlberT@SuperAlberT.it>
+	* Fixed dhcp package in order to correctly use debian
+	  dhcp3-server /etc/dhcp3 directory 
+	* Fixed dhcp package in order to correctly detect enabled service
+	* Beautified entries in /etc/hosts
+	* Fixed portmapper for debian
+
+Fri Apr 23 14:23:21 2004 Emiliano Gabrielli <AlberT@SuperAlberT.it>
 	* Created this ChangeLog
 	* Fixed Debian and SuSE problems with xdm (when not running)
 	* Fixed Debian problem with dhcp
@@ -9,15 +16,15 @@
 	* Added entire directory ltspcfg-XX to tarball, not just 
 	  a list of files
 
-Tue Mar 16 12:00:00 2004 Jim McQuillan
+Tue Mar 16 12:00:00 2004 Jim McQuillan <jam@McQuil.com>
 	* Fixed problem with default LTSP_DIR 
 
-Sat Feb  7 12:00:00 2004 Jim McQuillan
+Sat Feb  7 12:00:00 2004 Jim McQuillan <jam@McQuil.com>
 	* Fixed LANG problem
 
-Tue Dec  9 12:00:00 2003 Jim McQuillan
+Tue Dec  9 12:00:00 2003 Jim McQuillan <jam@McQuil.com>
 	* Added creating of the /etc/exports file
 
-Wed Aug  9 12:00:00 2003 Jim McQuillan () 
+Wed Aug  9 12:00:00 2003 Jim McQuillan <jam@McQuil.com>
 	* New installation script for ltspcfg
 
diff -ruN ltspcfg-0.6/ltspcfg ltspcfg-0.7/ltspcfg
--- ltspcfg-0.6/ltspcfg	2004-04-23 14:30:31.000000000 +0200
+++ ltspcfg-0.7/ltspcfg	2004-07-01 18:50:57.000000000 +0200
@@ -4,7 +4,7 @@
 use strict;
 use Getopt::Long;
 
-my $version = "0.6";
+my $version = "0.7";
 
 #
 # Globals
@@ -1016,17 +1016,22 @@
 
   sub is_enabled {
     my $self   = shift;
-    my $result = 0;
+    my $res = 0;
+	
     main::verbose_dot();
     if( $self->{installed} ){
-      if ( -f "/etc/rc.config" ){
-        $result = $self->suse_style_service( "START_DHCPD", "dhcpd" );
+	  my $level = Runlevel::get_configured_level();
+      if( -x "/usr/sbin/update-rc.d" ){                   # Debian system
+	    $res = system("(ls /etc/rc$level.d/S??dhcp* 2>&1) >/dev/null") ? 0 : 1;
+	  }
+      elsif ( -f "/etc/rc.config" ){
+        $res = $self->suse_style_service( "START_DHCPD", "dhcpd" );
       }
       elsif( $self->has_chkconfig() ){
-        $result = system( "chkconfig dhcpd" ) ? 0 : 1;
+        $res = system( "chkconfig dhcpd" ) ? 0 : 1;
       }
     }
-    return( $self->{enabled} = $result );
+    return( $self->{enabled} = $res );
   }
 
   sub is_running {
@@ -1170,7 +1175,8 @@
 
   sub show_notes {
     my $self = shift;
-    return( "Version " . $self->{version} );
+	
+    return( ($self->{version}) ? "Version ".$self->{version} : "" );
   }
 
   sub configure_screen {
@@ -1204,16 +1210,17 @@
       print("\nPlease install it, and then come back here and enable it.\n");
       main::cont();
     }
-    elsif( $self->{running} ){
-      print("\n\ndhcpd is already enabled and running!\n");
+    elsif( $self->{enabled} ){
+	  my $run = ($self->{running}) ? " and running" : "";
+      print("\n\ndhcpd is already enabled$run!\n");
       main::cont();
     }
     else{
+      if( main::get_yn("Do you want to enable the dhcpd daemon") eq "Y" ){
+        $self->enable(); 
+      }
       if( main::get_yn("Do you want to build a dhcpd.conf file") eq "Y" ){
         $self->build_conf(); 
-        if( main::get_yn("Do you want to enable the dhcpd daemon") eq "Y" ){
-          $self->enable(); 
-        }
       }
     }
   }  # sub configure_screen
@@ -1228,11 +1235,18 @@
     my $network   = Interfaces->get_primary_network();
 
     print ("Step 1: Building a dhcpd.conf file:\n\n");
-
-    my $filename = "/etc/dhcpd.conf";
+    
+	my $filepath;
+	if ( $self->{version}=="3" && -d "/etc/dhcp3" ) {
+	  $filepath = "/etc/dhcp3";
+	}
+	else {
+      $filepath = "/etc";
+	}
+    my $filename = "$filepath/dhcpd.conf";
     if( -f $filename ){
       print("  $filename already exists, creating new file as $filename.sample!\n\n");
-      $filename = "/etc/dhcpd.conf.sample";
+      $filename .= ".sample";
     }
 
     open( FH, ">$filename" ) or die "Couldn't create $filename: $!";
@@ -1241,7 +1255,7 @@
 #
 # Sample configuration file for ISC dhcpd
 #
-# Make changes to this file and copy it to /etc/dhcpd.conf
+# Make changes to this file and copy it to $filename
 #
 
 EOF
@@ -1602,7 +1616,10 @@
     main::verbose_dot();
     my $result = 0;
     if( $self->{installed} ){
-      if ( -f "/etc/rc.config" ){
+	  if ( !system("(ls /etc/rcS.d/S??portmap 2>&1 ) > /dev/null") ){
+		 $result = 1;
+	  }
+      elsif ( -f "/etc/rc.config" ){
         $result = $self->suse_style_service("START_PORTMAP", "portmap");
       }
       elsif( $self->has_chkconfig() ){
@@ -1653,8 +1670,9 @@
       print("\nPlease install it, and then come back here and enable it.\n");
       main::cont();
     }
-    elsif( $self->{running} ){
-      print("\n\nportmap is already enabled and running!\n");
+    elsif( $self->{enabled} ){
+	  my $run = ($self->{running}) ? " and running!" : "!";
+      print("\n\nportmap is already enabled$run\n");
       main::cont();
     }
     else{
@@ -1686,20 +1704,28 @@
 
     if( -x "/sbin/insserv" ){                              # SuSE system
       my $cmd = "insserv /etc/init.d/portmap,start=$level";
-      system( $cmd );
+	  if ( ! system( $cmd ) ) {
+	    $self->{enabled} = 1;
+	  }
     }
     elsif( -x "/usr/sbin/update-rc.d" ){                   # Debian system
-      # Don't need to do anything, cuz Debian starts portmap in runlevel S
+      # Debian starts portmap in runlevel S ... try to rebuild link if it's missing
+	  my $cmd ="update-rc.d -f portmap start 41 S . stop 10 0 6 .";
+	  if ( ! system( $cmd ) ) {
+	    $self->{enabled} = 1;
+	  }
     }
     elsif( -x "/sbin/chkconfig" ){                         # Redhat or Mandrake
       my $cmd = "chkconfig --level $level portmap on";
-      system( $cmd );
+	  if ( ! system( $cmd ) ) {
+	    $self->{enabled} = 1;
+	  }
     }
     else{
       print("\nSorry, I don't know how to enable the portmap daemon ");
       print("on this system.\nYou will have to enable it manually.\n");
     }
-
+    print "\n";
     main::cont();
 
   }  # sub enable
@@ -3012,7 +3038,7 @@
         my $name;
         if( $addr ne $server_addr ){
           $name = sprintf("ws%03d",$host);
-          printf( FH "%s\t\t%s\t%s\n", $addr, $name . ".ltsp", $name );
+          printf( FH "%-15s\t\t%s\t%s\n", $addr, $name . ".ltsp", $name );
         }
       }
       print( FH $self->ltsp_conf_footer() );

