shell-script-pt
[Top][All Lists]
Advanced

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

[no subject]



>From address@hidden Wed Aug 17 04:14:40 2011
Return-Path: <address@hidden>
Received: (qmail 85332 invoked from network); 17 Aug 2011 11:14:32 -0000
Received: from unknown (66.196.94.107)
  by m13.grp.re1.yahoo.com with QMQP; 17 Aug 2011 11:14:32 -0000
Received: from unknown (HELO ng14-ip2.bullet.mail.bf1.yahoo.com) 
(98.139.165.118)
  by mta3.grp.re1.yahoo.com with SMTP; 17 Aug 2011 11:14:32 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoogrupos.com.br; 
s=hotel; t=1313579671; bh=08x0hZwX6m9TDHDFipJuTJf/YSFBrvQ3rOarYtgcmMY=; 
h=Received:Received:Received:X-Sender:X-Apparently-To:X-Received:X-Received:X-Received:X-Received:X-Received:Date:To:Message-ID:User-Agent:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-Yahoo-Newman-Property:X-Originating-IP:X-eGroups-Msg-Info:X-Yahoo-Post-IP:From:Subject:X-Yahoo-Group-Post:X-Yahoo-Profile:X-YGroups-SubInfo:Sender:X-eGroups-Approved-By:X-eGroups-Auth;
 
b=d8Rk5wNcmF79g37QXXoi012XBIbAA8YVx8aNpNkb0PKLjc4yqYLbo6Qh6kEF1YGf5uaFQzo3j4YayjNYaebbxA59N8+r9jK+0l8QFm5NHBJLUqJDmuHO6DeGZJSvB+mO
Received: from [98.139.164.125] by ng14.bullet.mail.bf1.yahoo.com with NNFMP; 
17 Aug 2011 11:14:31 -0000
Received: from [69.147.65.174] by tg6.bullet.mail.bf1.yahoo.com with NNFMP; 17 
Aug 2011 11:14:31 -0000
Received: from [98.137.34.72] by t12.bullet.mail.sp1.yahoo.com with NNFMP; 17 
Aug 2011 11:14:31 -0000
X-Sender: address@hidden
X-Apparently-To: address@hidden
X-Received: (qmail 9578 invoked from network); 17 Aug 2011 11:05:40 -0000
X-Received: from unknown (98.137.34.46)
  by m7.grp.sp2.yahoo.com with QMQP; 17 Aug 2011 11:05:40 -0000
X-Received: from unknown (HELO n42b.bullet.mail.sp1.yahoo.com) (66.163.168.156)
  by mta3.grp.sp2.yahoo.com with SMTP; 17 Aug 2011 11:05:40 -0000
X-Received: from [69.147.65.148] by n42.bullet.mail.sp1.yahoo.com with NNFMP; 
17 Aug 2011 11:05:40 -0000
X-Received: from [98.137.34.184] by t11.bullet.mail.sp1.yahoo.com with NNFMP; 
17 Aug 2011 11:05:40 -0000
Date: Wed, 17 Aug 2011 11:05:39 -0000
To: address@hidden
Message-ID: <address@hidden>
User-Agent: eGroups-EW/0.82
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Yahoo Groups Message Poster
X-Yahoo-Newman-Property: groups-system
X-Originating-IP: 66.163.168.156
X-eGroups-Msg-Info: 1:6:0:0:0
X-Yahoo-Post-IP: 187.5.210.139
From: "pedroboni" <address@hidden>
Subject: Shell no Puppy Linux
X-Yahoo-Group-Post: member; u=432969643; 
y=LYX3UiIppstBJDIChdEwcgPMrBSpgGUMvYFfgGCy-x3SkgIp
X-Yahoo-Profile: pedroboni
X-eGroups-Approved-By: pinguimrmbr <address@hidden> via web; 17 Aug 2011 
11:14:30 -0000

Bom dia, pessoal.. Como obviamente est=E1 muito claro eu sou iniciante tant=
o em uso como em programa=E7=E3o para linux.
Para piorar eu uso a distro Lucid Puppy e ela =E9 um pouco diferente das ma=
is usadas.

O que eu preciso =E9 fazer um programa que n=E3o deixe o usu=E1rio minimiza=
r a tela do programa e ter acesso ao linux em si. Bom pra voc=EAs terem uma=
 ideia eu j=E1 criei a l=F3gica do script:

segue:=20
#!/bin/bash=20

# Script Criado Por Pedro Boni Para o acesso via TS

Principal() {=20

echo "Empresa"=20
=20=20=20
echo "------------------------------------------"=20
=20=20=20
echo "Opcoes:"=20
=20=20=20
echo=20
=20=20=20
echo "1. Apontamento"=20
=20=20=20
echo "2. Modo Manutencao [Necessita Senha]"=20
=20=20=20
echo "3. Desligar o Computador"=20=20=20
=20=20=20
echo=20
=20=20=20
echo -n "Qual a opcao desejada? "=20

read opcao=20
=20=20=20
case $opcao in=20

1) Apontamento ;;=20
=20=20=20=20=20=20
2) Manutencao ;;=20
=20=20=20=20=20
3) Desligar ;;=20=20=20=20
=20=20=20=20=20=20
*) "Op=E7=E3o desconhecida." ;=20
echo ; Principal ;;=20
=20=20=20
esac=20
}=20

Apontamento() {
        rdesktop 192.168.1.254 -u ts02 -p gr@f!c@ -k pt-br -f
        Principal
}
Manutencao() {
        echo -n "Digite a senha de manutencao: "
        read senha
=09
if [ $senha =3D "*****" ]; then
        echo "Senha aceita"
        exit 0
=09
else
        Principal
=09
fi
}=09

Desligar() {
        shutdown -now
}

Principal=20
---------------------------------------------------------------------------=
--------------------

Problemas com ele:
1 - Ele nao esta rodando automaticamente... Quando o script tinha apenas um=
a linha (que era a chamada pro TS) eu s=F3 colocava ele na pasta 'Startup' =
e ele rodava automaticamente. Agora mesmo clicando nele ele n=E3o executa. =
S=F3 abrindo como texto e clicando em executar.

2- Como eu disse, eu tenho que 'prender' o propgrama na tela e s=F3 liberar=
 pro modo manuten=E7=E3o ou pra desligar o PC.

3- N=E3o acertei ainda o comando shutdown este que coloquei a=ED n=E3o func=
iona. E o Halt n=E3o desliga o sistema. Apenas prepara. Se usar o halt, del=
sigar no bot=E3o e ligar de novo ele vai ficar reclamando q desligou errado=
. Neste sentido o sistema =E9 bem chato.

Aguardo a ajuda, pessoal.=20

Muito, muito Obrigado!




reply via email to

From: Unknown
[Prev in Thread] Current Thread [Next in Thread]