[pve-devel] r5103 - in dab/trunk: . scripts

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Sep 9 10:49:55 CEST 2010


Author: dietmar
Date: 2010-09-09 08:49:54 +0000 (Thu, 09 Sep 2010)
New Revision: 5103

Modified:
   dab/trunk/DAB.pm
   dab/trunk/Makefile
   dab/trunk/changelog.Debian
   dab/trunk/scripts/mysql_randompw
   dab/trunk/scripts/ssh_gen_host_keys
Log:
  * support dependency based startup (squeeze)
  
  * use postgresql 8.4 for squeeze



Modified: dab/trunk/DAB.pm
===================================================================
--- dab/trunk/DAB.pm	2010-09-09 07:25:37 UTC (rev 5102)
+++ dab/trunk/DAB.pm	2010-09-09 08:49:54 UTC (rev 5103)
@@ -582,8 +582,7 @@
 	$self->ve_command ("/etc/init.d/mysql stop");
     }
 
-    my $rpwscript = glob ("$rootdir/etc/rc2.d/S*mysql_randompw");
-    if (!($opts->{keepmycnf} || $rpwscript)) {
+    if (!($opts->{keepmycnf} || (-f "$rootdir/etc/init.d/mysql_randompw"))) {
 	unlink "$rootdir/root/.my.cnf";
     }
 
@@ -1158,8 +1157,10 @@
     my $rootdir = $self->vz_root_dir();
 
     my $base = basename ($script);
-    my $target = sprintf ("$rootdir/etc/rc${runlevel}.d/S%02d${base}", $prio);
+    my $target = "$rootdir/etc/init.d/$base";
     $self->run_command ("install -m 0755 '$script' '$target'");
+    $self->ve_command ("update-rc.d $base start $prio $runlevel");
+
     return $target;
 }
 
@@ -1381,6 +1382,7 @@
     # reset password
     $self->ve_command ("usermod -L root");
 
+    # regenerate sshd host keys
     $self->install_init_script ($script_ssh_init, 2, 14);
 
     if ($mta eq 'postfix') {
@@ -1521,9 +1523,12 @@
 
     my $suite = $self->{config}->{suite};
 
-    if ($suite eq 'squeeze' || $suite eq 'lenny' || $suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty') {
+    if ($suite eq 'lenny' || $suite eq 'hardy' || $suite eq 'intrepid' || $suite eq 'jaunty') {
 	@supp = ('8.3');
 	$pgversion = '8.3';
+    } elsif ($suite eq 'squeeze') {
+	@supp = ('8.4');
+	$pgversion = '8.4';
     }
 
     $pgversion = $opts->{version} if $opts->{version};

Modified: dab/trunk/Makefile
===================================================================
--- dab/trunk/Makefile	2010-09-09 07:25:37 UTC (rev 5102)
+++ dab/trunk/Makefile	2010-09-09 08:49:54 UTC (rev 5103)
@@ -1,6 +1,6 @@
 VERSION=1.1
 PACKAGE=dab
-PKGREL=6
+PKGREL=7
 
 
 SCRIPTS=        				\

Modified: dab/trunk/changelog.Debian
===================================================================
--- dab/trunk/changelog.Debian	2010-09-09 07:25:37 UTC (rev 5102)
+++ dab/trunk/changelog.Debian	2010-09-09 08:49:54 UTC (rev 5103)
@@ -1,3 +1,11 @@
+dab (1.1-7) unstable; urgency=low
+
+  * support dependency based startup (squeeze)
+  
+  * use postgresql 8.4 for squeeze
+
+ -- Proxmox Support Team <support at proxmox.com>  Thu, 09 Sep 2010 10:37:10 +0200
+
 dab (1.1-6) unstable; urgency=low
 
   *  use mysql-server-5.1 for squeezs

Modified: dab/trunk/scripts/mysql_randompw
===================================================================
--- dab/trunk/scripts/mysql_randompw	2010-09-09 07:25:37 UTC (rev 5102)
+++ dab/trunk/scripts/mysql_randompw	2010-09-09 08:49:54 UTC (rev 5103)
@@ -1,4 +1,14 @@
 #!/bin/sh
+### BEGIN INIT INFO
+# Provides:          mysql_randompw
+# Required-Start:    $local_fs
+# Required-Stop:
+# X-Start-Before:    mysql
+# Default-Start:     2
+# Default-Stop:
+# Short-Description: Generate random MySQL root password
+# Description:       Generate and set a random MySQL root password
+### END INIT INFO
 
 set -e
 
@@ -23,4 +33,5 @@
 
 chmod 0600 /root/.my.cnf
 
-rm -f $0
+rm -f /etc/init.d/mysql_randompw
+update-rc.d -f mysql_randompw remove

Modified: dab/trunk/scripts/ssh_gen_host_keys
===================================================================
--- dab/trunk/scripts/ssh_gen_host_keys	2010-09-09 07:25:37 UTC (rev 5102)
+++ dab/trunk/scripts/ssh_gen_host_keys	2010-09-09 08:49:54 UTC (rev 5103)
@@ -1,4 +1,14 @@
 #!/bin/sh
+### BEGIN INIT INFO
+# Provides:          ssh_gen_host_keys
+# Required-Start:    $local_fs
+# Required-Stop:
+# X-Start-Before:    sshd
+# Default-Start:     2
+# Default-Stop:
+# Short-Description: Regenerate SSH keys
+# Description:       Regenerate container SSH keys for uniqueness.
+### END INIT INFO
 
 set -e
 
@@ -16,4 +26,6 @@
 rm -f /etc/ssh/ssh_host_dsa_key
 ssh-keygen -q -f /etc/ssh/ssh_host_dsa_key -t dsa -N ''
 
-rm -f $0
+rm -f /etc/init.d/ssh_gen_host_keys
+update-rc.d -f ssh_gen_host_keys remove
+




More information about the pve-devel mailing list