why won't this script work in my Edubuntu setup?

Jim McQuillan jam at McQuil.com
Thu Aug 30 12:23:11 UTC 2007


David,

For some reason, the Ubuntu guys decided that they'd rather use 'dash' 
as the default shell, instead of 'bash'.

I haven't looked closely at your script, but the first thing I'd try is 
changing the first line from:

   #!/bin/sh

to:

   #!/bin/bash

Just to see if that makes a difference.

If it does, let us know.  I suppose it should be reported somewhere that 
there's an incompatibility (If indeed that's the case).

I've had lots of script breakage due to this problem.  It still puzzles 
me why they'd want to stray from the shell that most everyone else uses.

Jim McQuillan
jam at Ltsp.org



David Trask wrote:
> I had this script (below) which I used to use to "kill" users quickly....I
> even used to build other scripts from this one....such as one that logged
> off my kindergarten class...etc.  Problem is....it doesn't work in my
> current Edubuntu situation (with smbldap).  any idea why?  What am I
> missing?  I have the script in /usr/bin and the usage is
> 
> stop username 
> 
> used to work fine, but I know I'm missing something with Edubuntu.  Here's
> the script....(commented to avoid messing with your system)  any ideas to
> modify?
> 
> #   #!/bin/sh
> #   # usage  stop username
> #   # stop
> #   # script to logoff a student
> #   #
> 
> #   if [ $1 != "root" ]
> #   then
> #   for i in $(pgrep -u $1)
> #   do
> #      kill -9 $i
> #   done
> # else
> #    clear
> #    echo "Can't kill the root!!"
> #  fi
> 
> 
> David N. Trask
> Technology Teacher/Director
> Vassalboro Community School
> dtrask at vcsvikings.org
> (207)923-3100
> 
> 
> 




More information about the edubuntu-devel mailing list