Mantis - logwatch
Viewing Issue Advanced Details
2186 packaging minor have not tried 2007-03-27 18:07 2010-06-15 02:32
ucbscf  
 
normal  
closed  
won't fix  
none    
none  
0002186: Installation fails during jumpstart
In my finish.log:
/a/var/sadm/pkg/CSWlogwatch/install/i.cron: crontab: not found
sh: crontab: not found
pkgadd: ERROR: class action script did not complete successfully

I haven\'t tried this, but maybe something like:

--- i.cron- Mon Oct 11 11:04:50 2004
+++ i.cron Tue Mar 27 15:05:18 2007
@@ -1,15 +1,18 @@
 # PKGINST parameter provided by installation service
+
+CHROOTDIR=${BASEDIR:-/}
+
 while read src dest
 do
 user=`basename $dest` ||
 exit 2
-(crontab -l $user |
-sed -e \"/#$PKGINST$/d\" > /tmp/$$crontab) ||
+(${BASEDIR}/usr/sbin/chroot ${CHROOTDIR} /bin/crontab -l $user |
+sed -e \"/#$PKGINST$/d\" > ${BASEDIR}/tmp/$$crontab) ||
 exit 2
-sed -e \"s/$/#$PKGINST/\" $src >> /tmp/$$crontab ||
+sed -e \"s/$/#$PKGINST/\" $src >> ${BASEDIR}/tmp/$$crontab ||
 exit 2
-su $user -c \"crontab /tmp/$$crontab\" ||
+${BASEDIR}/usr/sbin/chroot ${CHROOTDIR} /bin/su $user -c \"crontab /tmp/$$crontab\" ||
 exit 2
-rm -f /tmp/$$crontab
+rm -f ${BASEDIR}/tmp/$$crontab
 done
 exit 0


--- r.cron- Mon Oct 11 11:04:44 2004
+++ r.cron Tue Mar 27 15:04:54 2007
@@ -1,13 +1,16 @@
 # PKGINST parameter provided by installation service
+
+CHROOTDIR=${BASEDIR:-/}
+
 while read path
 do
 user=`basename $path` ||
 exit 2
-(crontab -l $user |
-sed -e \"/#$PKGINST$/d\" > /tmp/$$crontab) ||
+(${BASEDIR}/usr/sbin/chroot ${CHROOTDIR} /bin/crontab -l $user |
+sed -e \"/#$PKGINST$/d\" > $BASEDIR/tmp/$$crontab) ||
 exit 2
-su $user -c \"crontab /tmp/$$crontab\" ||
+${BASEDIR}/usr/sbin/chroot ${CHROOTDIR} /bin/su $user -c \"crontab /tmp/$$crontab\" ||
 exit 2
-rm -f /tmp/$$crontab
+rm -f $BASEDIR/tmp/$$crontab
 done
 exit
Issue History
2010-06-15 02:32 bwalton Note Added: 0008022
2010-06-15 02:32 bwalton Status new => closed
2010-06-15 02:32 bwalton Resolution open => won't fix

Notes
(0008022)
bwalton   
2010-06-15 02:32   
As this is so old, I'm closing it without any inspection. Please let me know if the recently updated package still exhibits this problem.

-Ben