Help with creating a Debian Package

Richard Bailey rmjb at mail.com
Fri Apr 27 16:23:04 BST 2007


Hi Carl, you probably want to use the postinst and prerm scripts:
http://doc.ubuntu.com/ubuntu/packagingguide/C/basic-scratch.html#id2557084
http://www.debian.org/doc/maint-guide/ch-dother.en.html#s-maintscripts

- Richard

On 4/23/07, Carl J. Richell <carl at system76.com> wrote:
>
> Hi Everyone,
>
> I have a pretty simple (I think) debian package that I need created but
> I'm not sure how to go about it.  When the package is installed the
> following script should be applied.  Once the package is removed the script
> should be reversed.
>
> -------- Script ----------
>
> #!/bin/bash
> #
> ## For Ubuntu 7.04 "Feisty Fawn"
> ## Installing this package changes the hard drive driver from ata-piix to
> piix
> ## Removing this packages reverts back to the new ata-piix driver
> ## Released under the GNU General Public License (See LICENSE)
>
> # Check ubuntu version - must be 7.04
> ubuntuversion () {
> export RELEASE=`lsb_release -r -s`
>
> if [ $RELEASE = 7.04 ];
> then fix_ata;
> else exit;
> fi
> }
>
> fix_ata () {
> # replaces ata-piix driver with piix driver
> echo blacklist ata_piix | sudo tee -a /etc/modprobe.d/blacklist-ata
> echo piix | sudo tee -a /etc/initramfs-tools/modules
> sudo update-initramfs -u
> sudo reboot
>
> }
>
> ubuntuversion
>
> -------- Script ----------
>
> This is related to a Feisty bug effecting lots of our existing users:
> https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/84603
>
> Thanks for the help!
>
> Carl J Richell
> System76, Inc.
>
> --
> Ubuntu-motu mailing list
> Ubuntu-motu at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu
>



-- 
Reporter: What is your opinion on the obesity problem?
King: I prefer it to the famine problem
- Wizard of ID
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-motu/attachments/20070427/840682b5/attachment.htm 


More information about the Ubuntu-motu mailing list