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 <[EMAIL PROTECTED]> 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
[email protected]
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
--
Ubuntu-motu mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu