[Simple-cdd-devel] My first project (postinst problem)

Spiros Georgaras sng at hellug.gr
Fri Jun 29 09:45:28 UTC 2012


Hi all

I am trying to create a cd based on squeeze

Trying to add firefox 13, i have managed to gat it included in /simple-cdd (on
the CD). but trying to untar it to /usr/loca/share always fails

I use a profile called fids, but fids.postinst does not get processed so i use
default.postinst

In this file I have the commands:


======================

#!/bin/bash

cdmount=`mount | grep cdrom | awk '{print $3}'`
if [ -z "$cdmount" ];then
      cdmount=`cat /proc/mounts | grep cdrom | awk '{print $2}'`
fi

if [ -z "$cdmount" ];then
      if [ -d /cdrom ];then
          cdmount=/cdrom
      elif [ -d /media/cdrom ];then
          cdmount=/media/cdrom
      else
          cdmount=/target/media/cdrom
      fi
fi

# trying to prevent unmount
cd "$cdmount"

fir=`find "$cdmount" -name firefox-13.0.1.tar.bz2`
mount >> /debug.txt
echo "" >> /debug.txt
cat /proc/mounts >> /debug.txt
echo "" >> /debug.txt
echo "cdmount=$cdmount" >> /debug.txt
echo "fir=$fir" >> /debug.txt

echo "" >> /debug.txt
find "$cdmount" >> /debug.txt

tar -C /usr/local/share -xjf "$cdmount"/"$fir"
ln -s /usr/local/share/firefox/firefox /usr/bin/firefox

cd

======================

As you can see I try by best to find the tarball, but i always fail.

- cdmount points to /cdrom, but it looks like it's an empty dir

- /proc/mounts reports that the cd is mounted, but "mount" tells me it's not...

- syslog tells me that /dev/sr0 gets unmounted after my default.postinst is
finished

What am i doing wrong?

-- 
Regards
   Spiros





More information about the Simple-cdd-devel mailing list