[csw-users] vimtutor bad trap problem when /opt/csw/bin not in $PATH

Manish Agrawal magrawal at coba.usf.edu
Wed Sep 19 15:19:50 CEST 2007


Thanks very much, there are some problems:

1. Every student will have to do this hack in their own respective zones. They are all newbies. Since they don't know vi, how are they going to write this script in the first place? Yesterday, we all used /opt/csw/bin/pkg-get install nano to get an editor available.

2. What is the point of having vimtutor in the first place if it does not work with the default paths? Isn't vimtutor for newbies?

3. What are fresh users going to think of Solaris and vim if they have to first do this hack before they can use a tutorial meant for newbies?

The best solution for me is to copy /etc/default/login from the global zone while creating the zone using zonemgr, but I don't want to do it and would prefer vimtutor to just work out of the box with the Solaris defaults.

Thanks
Manish

P.S.: In the third line of your script, you really mean /opt/csw/bin/vimtutor.orig, don't you ?

On Wed, 19 Sep 2007 09:06:53 -0400, Alessio <a.cervellin at acm.org> wrote:

> can't you do a workaround like this:
> #mv /opt/csw/bin/vimtutor /opt/csw/bin/vimtutor.orig
> #vi /opt/csw/bin/vimtutor
>   #!/bin/bash
>   PATH=/opt/csw/bin:$PATH
>   vimtutor
> :wq!
> #chmod +x /opt/csw/vimtutor
>
> now everyone should be able to run vimtutor
>
> Manish Agrawal wrote:
>> When /opt/csw/bin is not in the path, vimtutor does not run. This is a problem because I am using Solaris zones in a classroom environment to teach some basic system administration (including introduction to vi) and to give students the opportunity to implement some UNIX STIG controls. There is one zone per student, and I don't want to modify the default /etc/default/login during zone creation using zonemgr (I want students to go in and do it themselves if they like). Requiring students to first edit /etc/default/login, logout, and log back in, seems to be an unnecessary hurdle.
>>
>> Is it possible to modify vimtutor so that it works with the default paths.
>>
>> Thanks
>> Manish
>>
>> -bash-3.00$ /opt/csw/bin/vimtutor
>> /opt/csw/bin/vimtutor: trap: bad trap
>> vi: illegal option -- u
>> Usage: vi [- | -s] [-l] [-L] [-wn] [-R] [-S] [-r [file]] [-t tag]
>> [-v] [-V] [-x] [-C] [+cmd | -c cmd] file...
>> vi: illegal option -- u
>> Usage: vi [- | -s] [-l] [-L] [-wn] [-R] [-S] [-r [file]] [-t tag]
>> [-v] [-V] [-x] [-C] [+cmd | -c cmd] file...
>>
>> -bash-3.00$ echo $PATH
>> /usr/sbin:/usr/bin:
>>
>> -bash-3.00$ uname -a
>> SunOS dcomsm1 5.10 Generic_118833-33 sun4v sparc SUNW,Sun-Fire-T200
>>
>> -bash-3.00# zonemgr -a list
>>    ID NAME             STATUS         PATH
>>     0 global           running        /
>>     1 vexavier         running        /export/zones/vexavier
>>     2 afreickm         running        /export/zones/afreickm
>>     3 tzharp           running        /export/zones/tzharp
>>     5 misma            running        /export/zones/misma
>>     6 cjjohnso         running        /export/zones/cjjohnso
>>     7 pwburke          running        /export/zones/pwburke
>>     8 jpcarson         running        /export/zones/jpcarson
>>     9 dcomsm1          running        /export/zones/dcomsm1
>>    11 tapostle         running        /export/zones/tapostle
>>    12 mkording         running        /export/zones/mkording
>>    13 adontams         running        /export/zones/adontams
>>    14 dlogsdon         running        /export/zones/dlogsdon
>>    15 tlotzke          running        /export/zones/tlotzke
>>    16 svmehta          running        /export/zones/svmehta
>>    18 smoline          running        /export/zones/smoline
>>    19 cnolet           running        /export/zones/cnolet
>>    20 jparappa         running        /export/zones/jparappa
>>    21 aramin           running        /export/zones/aramin
>>    22 trosenga         running        /export/zones/trosenga
>>    23 bschwegm         running        /export/zones/bschwegm
>>    24 mweibley         running        /export/zones/mweibley
>>    25 fdwillia         running        /export/zones/fdwillia
>>    26 chisseri         running        /export/zones/chisseri
>>    27 cdafnis          running        /export/zones/cdafnis
>>    28 cmillsap         running        /export/zones/cmillsap
>>
>> -bash-3.00$ pkginfo -l CSWvim
>>     PKGINST:  CSWvim
>>        NAME:  vim - Vi IMproved
>>    CATEGORY:  application
>>        ARCH:  sparc
>>     VERSION:  7.0.109,REV=2006.09.18
>>     BASEDIR:  /
>>      VENDOR:  ftp://ftp.vim.org/pub/vim/unix/ packaged for CSW by Cory Omand
>>      PSTAMP:  comand at ra-20060918154023
>>    INSTDATE:  Sep 18 2007 16:25
>>     HOTLINE:  http://www.blastwave.org/bugtrack/
>>       EMAIL:  comand at blastwave.org
>>      STATUS:  completely installed
>>       FILES:        7 installed pathnames
>>                     1 shared pathnames
>>                     1 directories
>>                     2 executables
>>                  5270 blocks used (approx)
>> _______________________________________________
>> users mailing list
>> users at lists.blastwave.org
>> https://lists.blastwave.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> users at lists.blastwave.org
> https://lists.blastwave.org/mailman/listinfo/users
>



-- 
Manish Agrawal
Asstt. Prof., Dept. of ISDS, Univ. of South Florida
4202 E. Fowler Ave., CIS 1040, Tampa, Fl 33620 - 7800, U.S.A.
(813)-974-6716 (W) 974-6749 (FAX) magrawal at coba.usf.edu
http://coba.usf.edu/departments/isds/faculty/agrawal/index.html
--



More information about the users mailing list