[Demudi-commits] r236 - in demudi/trunk: . debian
Free Ekanayaka
free-guest@haydn.debian.org
Fri, 19 Nov 2004 05:02:34 -0700
Author: free-guest
Date: 2004-11-19 05:01:45 -0700 (Fri, 19 Nov 2004)
New Revision: 236
Modified:
demudi/trunk/debian/changelog
demudi/trunk/demudi-upgrade
Log:
demudi (0.3) unstable; urgency=low
* Added logging facility to the upgrade scripts, helps reports.
-- Free Ekanayaka <free@agnula.org> Thu, 18 Nov 2004 23:10:51 +0100
Modified: demudi/trunk/debian/changelog
===================================================================
--- demudi/trunk/debian/changelog 2004-11-18 22:10:42 UTC (rev 235)
+++ demudi/trunk/debian/changelog 2004-11-19 12:01:45 UTC (rev 236)
@@ -1,3 +1,9 @@
+demudi (0.3) unstable; urgency=low
+
+ * Added logging facility to the upgrade scripts, helps reports.
+
+ -- Free Ekanayaka <free@agnula.org> Thu, 18 Nov 2004 23:10:51 +0100
+
demudi (0.2) unstable; urgency=low
* Added demudi-upgrade to make life easier
Modified: demudi/trunk/demudi-upgrade
===================================================================
--- demudi/trunk/demudi-upgrade 2004-11-18 22:10:42 UTC (rev 235)
+++ demudi/trunk/demudi-upgrade 2004-11-19 12:01:45 UTC (rev 236)
@@ -6,6 +6,7 @@
tmpdir="/tmp/$program"
snapshot="2004/11/15"
logfile="/root/demudi-upgrade.log"
+quiet=""
#
# Start
@@ -21,7 +22,7 @@
purge() {
debconf-set-selections $tmpdir/debconf_selections.bak
rm -f /etc/apt/apt.conf.d/10$program
- rm -Rf $tmpdir/
+# rm -Rf $tmpdir/
}
#
@@ -32,19 +33,20 @@
Package: *
Pin: release o=AGNULA
Pin-Priority: 1001
+EOF
}
gen_apt_sources () {
- if /sbin/route -n | /bin/grep -q -e ^0.0.0.0; then
+ if /sbin/route -n | /bin/grep -q -e ^0.0.0.0; then
- cat <<EOF > $tmpdir/sources.list
+ cat <<EOF > $tmpdir/sources.list
deb http://apt.agnula.org/demudi testing local
deb http://snapshot.debian.net/archive/$snapshot/debian/ testing main
EOF
- else
+ else
- cat <<EOF | debconf-set-selections
+ cat <<EOF | debconf-set-selections
base-config apt-setup/security-updates boolean false
base-config apt-setup/another boolean false
base-config apt-setup/non-free boolean false
@@ -52,12 +54,13 @@
debconf debconf/priority select high
debconf debconf/frontend select Dialog
EOF
- apt-setup $options probe -N
- fi
+ apt-setup $options probe -N
+ fi
}
gen_apt_conf () {
cat <<EOF > /etc/apt/apt.conf.d/10$program
+quiet "$quiet";
DPkg
{
Options {"--force-confold";}
@@ -82,7 +85,8 @@
!!
!!
!! Something wrong happened!
-!! Please send the error log to users@lists.agnula.org
+!! You can find the the error log at $logfile
+!! PLease send it to users@lists.agnula.org
!!
!!
EOF
@@ -98,12 +102,14 @@
debconf debconf/frontend select Noninteractive
EOF
- if ! apt-get update; then abort; fi
- if ! apt-get dist-upgrade; then abort; fi
- if ! tasksel install base; then abort; fi
- exit 0
+ if ! apt-get update $quiet ; then abort; fi
+ extra=$(tasksel --task-packages base)
+
+ if ! apt-get dist-upgrade $quiet ; then abort; fi
+ if ! apt-get install -y $quiet $extra; then abort; fi
+
}
run_cfengine () {
@@ -138,10 +144,16 @@
}
+trap "abort" SIGINT SIGTERM
-2>&1
+if [ "$1" == "log" ]; then
+ $0 quiet 2>&1 | tee $logfile
+ exit
+fi
-trap "abort" SIGINT SIGTERM
+if [ "$1" == "quiet" ]; then
+ quiet="-q"
+fi
init
gen_apt_preferences