[Pkg-samba-maint] r839 - branches/samba4
Steinar H. Gunderson
sesse at costa.debian.org
Tue Jan 3 14:46:01 UTC 2006
Author: sesse
Date: 2006-01-03 14:46:00 +0000 (Tue, 03 Jan 2006)
New Revision: 839
Modified:
branches/samba4/changelog
branches/samba4/samba.postinst
Log:
Continue Samba 3 upgrade work: Add (untested) upgrade code to postinst.
Modified: branches/samba4/changelog
===================================================================
--- branches/samba4/changelog 2006-01-03 14:40:46 UTC (rev 838)
+++ branches/samba4/changelog 2006-01-03 14:46:00 UTC (rev 839)
@@ -11,6 +11,8 @@
whenever upstream syncs with us.
* Attempt to upgrade from Samba 3 if that's what the user tries to do.
* Copy upgrade script into /usr/lib/samba/setup.
+ * Check for upgrade from << 3.9.0 in postinst, and upgrade if the user
+ wished to.
* Run "make quicktest" on build.
* Only provision in samba.postinst if we're being called with "configure".
Modified: branches/samba4/samba.postinst
===================================================================
--- branches/samba4/samba.postinst 2006-01-03 14:40:46 UTC (rev 838)
+++ branches/samba4/samba.postinst 2006-01-03 14:46:00 UTC (rev 839)
@@ -5,23 +5,37 @@
if [ "$1" = "configure" ]; then
. /usr/share/debconf/confmodule
- db_get samba/setup-pdc || true
+ # See if we're upgrading from Samba 3
+ UPGRADE_FROM_V3=
+ if [ ! -z "$2" ]; then
+ if dpkg --compare-versions "$2" lt "3.9.0"; then
+ db_get samba/upgrade-from-v3 || true
+ if [ "$RET" = "true" ]; then
+ UPGRADE_FROM_V3=yes
+ /usr/lib/samba/setup/upgrade
+ fi
+ fi
+ fi
- if [ "$RET" = "true" ]; then
- db_get samba/realm
- REALM="$RET"
+ if [ -z "$UPGRADE_FROM_V3" ]; then
+ db_get samba/setup-pdc || true
- db_get samba/domain
- DOMAIN="$RET"
+ if [ "$RET" = "true" ]; then
+ db_get samba/realm
+ REALM="$RET"
- db_get samba/password
- PASSWORD="$RET"
+ db_get samba/domain
+ DOMAIN="$RET"
- db_stop
+ db_get samba/password
+ PASSWORD="$RET"
- /usr/lib/samba/setup/provision --realm="$REALM" --domain="$DOMAIN" --adminpass="$PASSWORD"
- else
- db_stop
+ db_stop
+
+ /usr/lib/samba/setup/provision --realm="$REALM" --domain="$DOMAIN" --adminpass="$PASSWORD"
+ else
+ db_stop
+ fi
fi
fi
More information about the Pkg-samba-maint
mailing list