wan_jm writes:
>        I found some problem of crontab in Solaris 10 u6 which is ok in S10 u5 
> and before. is it a bug?
>        I write one perl script to edit cronjob file automatically and the 
> name of which is cron_switch.pl.
>       1. EDITOR="/omp/s10upgrade/cron_switch.pl on"  #node there is one 
> argument "on" after the command.
>       2. run crontab -e to edit it. after which crontab gives error messages:
> crontab: /omp/s10upgrade/cron_switch.pl on: No such file or directory. 
> from which we can see crontab take "/omp/s10upgrade/cron_switch.pl on" as 
> script names.
>         
> then I use truss to prove my guess. which gives the following result.
> 9394:   execve("/omp/s10upgrade/cron_switch.pl on", 0xFFBFE970, 0xFFBFEB58) 
> Err#2 ENOENT

This is due to the fix for CR 6618839, which switched crontab from
using system() to posix_spawnp() in Nevada build 92 and (apparently)
backported to S10 using execlp() as well.

In general, the $EDITOR variable is supposed to point to an
executable, not a string to be interpreted by a shell, so I don't
think the new behavior is necessarily wrong.  If I were doing what I
think you're trying to do, I would have done something like this:

  (
    echo '#!/bin/sh'
    echo '/omp/s10upgrade/cron_switch.pl on "$@"'
  ) > /omp/s10upgrade/ed.sh
  chmod +x /omp/s10upgrade/ed.sh
  EDITOR=/omp/s10upgrade/ed.sh
  export EDITOR

Since you're using Solaris 10 and (thus) not OpenSolaris, I suggest
contacting your local support representative.

-- 
James Carlson, Solaris Networking              <[email protected]>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to