[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

/etc/init.d/gpm



olah gente...
Como eu sou newbie pode ser soh besteira, mas para q usar o ssh-agent no script do gpm?
Alem disso qndo eu tento reiniciar o gpm recebo a mensagem:
<mensagem>
SSH_AGENT_PID not set, cannot kill agent
Stopping mouse interface server: gpm.
SSH_AUTH_SOCK=/tmp/ssh-XXT2lmb0/agent.1360; export SSH_AUTH_SOCK;
SSH_AGENT_PID=1361; export SSH_AGENT_PID;
echo Agent pid 1361;
Starting mouse interface server: gpm.
</mensagem>
O meu ssh-agent tah com pau?
vai em anexo o script...
flw...
--
Giscar Paiva - Estagiário CPD-GOEG
Linux User number 257652
#!/bin/sh
#
# Start Mouse event server

PIDFILE=/var/run/gpm.pid
GPM=/usr/sbin/gpm
CFG=/etc/gpm.conf

test -x $GPM || exit 0

if [ "$(id -u)" != "0" ]
then
  echo "You must be root to start, stop or restart gpm."
  exit 1
fi
 

cmdln=
if [ -f $CFG ]; then
  . $CFG
  if [ -n "$device" ]; then cmdln="$cmdln -m $device"; fi
  if [ -n "$type" ]; then cmdln="$cmdln -t $type"; fi
  if [ -n "$responsiveness" ]; then cmdln="$cmdln -r $responsiveness"; fi
  if [ -n "$sample_rate" ]; then cmdln="$cmdln -s $sample_rate"; fi
  if [ -n "$repeat_type" ]; then cmdln="$cmdln -R$repeat_type"; fi
  # Yes, this /IS/ correct! There is no space after -R!!!!!!
  # I reserve the right to throw manpages at anyone who disagrees.
  if [ -n "$append" ]; then cmdln="$cmdln $append"; fi
fi

gpm_start () {
  ssh-agent
  echo -n "Starting mouse interface server: gpm"
  start-stop-daemon --start --quiet --exec $GPM -- $cmdln
  echo "."
  return 0
}

gpm_stop () {
  ssh-agent -k
  echo -n "Stopping mouse interface server: gpm"
  /usr/sbin/gpm -k
  echo "."
}


case "$1" in
  start)
     gpm_start
     ;;
  stop)
     gpm_stop
     ;;
  force-reload|restart)
     gpm_stop
     sleep 3
     gpm_start
     ;;
  *)
     echo "Usage: /etc/init.d/gpm {start|stop|restart|force-reload}"
     exit 1
esac

exit 0

Reply to: