vdr/vdr-plugin-bitstreamout/debian config postinst postrm templates changelog rules

Thomas Schmidt pkg-vdr-dvb-changes@lists.alioth.debian.org
Wed, 07 Jul 2004 18:36:38 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-bitstreamout/debian
In directory haydn:/tmp/cvs-serv9727/vdr/vdr-plugin-bitstreamout/debian

Modified Files:
	changelog rules 
Added Files:
	config postinst postrm templates 
Log Message:
* added Debconf-Question about automatically mounting tmpfs if it is not mounted allready

--- NEW FILE: postinst ---
#! /bin/sh
# postinst script for vdr-plugin-bistreamout
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <postinst> `configure' <most-recently-configured-version>
#        * <old-postinst> `abort-upgrade' <new version>
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
#          <new-version>
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
#          <failed-install-package> <version> `removing'
#          <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
#
# quoting from the policy:
#     Any necessary prompting should almost always be confined to the
#     post-installation script, and should be protected with a conditional
#     so that unnecessary prompting doesn't happen if a package's
#     installation fails and the `postinst' is called with `abort-upgrade',
#     `abort-remove' or `abort-deconfigure'.

case "$1" in
    configure)

		. /usr/share/debconf/confmodule

		db_get vdr-plugin-bitstreamout/mount_tmpfs
	
		if [ $RET = "true" ]
		then
	    	# Try to mount tmpfs

			if ! mount | grep -q tmpfs
			then
				if [ ! -d /dev/shm ]
				then
					mkdir /dev/shm
				fi
			
				if mount -t tmpfs tmpfs /dev/shm
				then
		    		if ! cat /etc/fstab | grep -q ^tmpfs
		    		then
    					echo "tmpfs /dev/shm tmpfs defaults 0 0" >> /etc/fstab
		    		fi
				else
					echo "tmpfs could not be mounted, probably your kernel \
					does not have tmpfs-support"
				fi
			fi
		fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0


--- NEW FILE: config ---
#!/bin/sh

if ! mount | grep -q tmpfs
then
	. /usr/share/debconf/confmodule

   # ask module install question:
   db_input high vdr-plugin-bitstreamout/mount_tmpfs || false
   db_go
fi

--- NEW FILE: templates ---
Template: vdr-plugin-bitstreamout/mount_tmpfs
Type: boolean
_description: Try to automatically mount tmpfs?
 Enable this, if you want setup to automatically mount the Virtual Memory
 File System tmpfs, needed by the bitstreamout-plugin.
 .
 This script will try to mount tmpfs, and if this is successful, it will 
 add a new entry for tmpfs to you /etc/fstab.
 .
 If mounting fails, your kernel does not have tmpfs-support, and you will
 need to rebuild you kernel with the CONFIG_TMPFS option enabled.
 .
 tmpfs is a pseudo filesystem, everything in tmpfs is temporary in the
 sense that no files will be created on your hard drive. The files live in
 memory and swap space. If you unmount a tmpfs instance, everything stored
 therein is lost.
Default: false

Index: rules
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-bitstreamout/debian/rules,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- rules	3 Jul 2004 10:53:38 -0000	1.4
+++ rules	7 Jul 2004 18:36:35 -0000	1.5
@@ -43,6 +43,9 @@
 	
 	cd bitstreamout; rm -f libvdr-*.so*
 	cd bitstreamout; make clean
+
+	# Update debconf-templates:
+	debconf-updatepo
 	
 	dh_clean
 

--- NEW FILE: postrm ---
#! /bin/sh
# postrm script for vdr-plugin-bitstreamout
#
# see: dh_installdeb(1)

set -e

# summary of how this script can be called:
#        * <postrm> `remove'
#        * <postrm> `purge'
#        * <old-postrm> `upgrade' <new-version>
#        * <new-postrm> `failed-upgrade' <old-version>
#        * <new-postrm> `abort-install'
#        * <new-postrm> `abort-install' <old-version>
#        * <new-postrm> `abort-upgrade' <old-version>
#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package


case "$1" in
	purge)
   	# purge debconf database	
	   . /usr/share/debconf/confmodule
	   db_purge || echo "WARNING: db_purge failed"
	;;
       
   remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
   ;;

   *)
   	echo "postrm called with unknown argument \`$1'" >&2
      exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-bitstreamout/debian/changelog,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- changelog	3 Jul 2004 10:32:42 -0000	1.6
+++ changelog	7 Jul 2004 18:36:35 -0000	1.7
@@ -1,3 +1,11 @@
+vdr-plugin-bitstreamout (0.61-2) unstable; urgency=low
+
+  * Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
+    - Added debconf-question about mounting tmpfs if tmpfs is not
+      mounted allready
+
+ -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org>  Wed,  7 Jul 2004 20:25:00 +0200
+
 vdr-plugin-bitstreamout (0.61-1) unstable; urgency=low
   
   * Thomas Schmidt: