Sponsored Content
Top Forums UNIX for Dummies Questions & Answers connection doesn't work anymore Post 302302749 by anubisbr on Tuesday 31st of March 2009 10:51:20 PM
Old 03-31-2009
connection doesn't work anymore

Hello,

first of all, I want to make myself clear about my language. I'm brazilian, so I ask you all to understand if i commit any mistake with the grammar.

Here is the problem.

Some days ago I needed to use a "sh" command in the Terminal (I use a Mac OSX 10.5.6) followed by a file containing the following text:

if [ "$(grep -o blablabla.blabla.com /etc/hosts)" = "blablabla.blabla.com" ];
then exit 0
else
echo "127.0.0.1 blablabla.blabla.com" >> /etc/hosts
exit 0
fi


I executed this, reeboted my computer imediately after this execution and everything worked well since then, even to User or Admin (or root, as you prefer). But crazily, a couple of days after this execution, my Mac rebooted automaticaly and the User account could not access the internet anymore.Smilie
I mean: The Admin acount still works properly, but the User account, when the user is required to make any kind of login (e.g. enter in a e-mail, log in MSN, log in Gmail), the connection fails and, says that I should ask for some help. =P
I read all kinds of information and it seems so difficult for me, once I'm not a programmer or anything like that.

Please, could you show me how to solve this problem?
Really thank you all in advance,

AnubisBR

P.S. 1: the "blablabla" in the command text is just a example of url, because the real one doesn't matches here in the context.
P.S. 2: can anyone explain me what "sh", "grep -o" and "echo" mean/do? I mean, in a easy way which I can understand.
P.S. 3: is this problem/thing "undoable"?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies

2. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

3. Shell Programming and Scripting

Pause shell script till folder doesn't change size anymore

Hi, I recently would like to write a shell script that 1. Runs in the background (can be done with "&", but i'd be happy for other solutions to keep programs running) 2. Does its stuff 3 THEN checks a specified folder for a size change over time (say, each 5 seconds. AND ONLY continues with... (9 Replies)
Discussion started by: pasc
9 Replies

4. UNIX for Advanced & Expert Users

pkill won't work on firefox anymore

Can someone tell me why pkill won't work on firefox anymore? (11 Replies)
Discussion started by: cokedude
11 Replies

5. Red Hat

Removing LVM Volume Group that doesn't exist anymore

Our SAN administrator decided to unpresent then destroy LUN's we were actively using as a volume group (all PV's in said volume group). Now every time I do a pvscan or whatever it complains about I/O errors trying to access those PV's. How do I get it to forget the VG existed completely? vgreduce... (7 Replies)
Discussion started by: thmnetwork
7 Replies

6. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

7. Shell Programming and Scripting

Color prompt with file numbers does not work anymore

I have used this color prompt on my servers for long time, in file ~\.bashrc Black="\" Dark="\" Blue="\" LBlue="\" Green="\" LGreen="\" Cyan="\" LCyan="\" Red="\" LRed="\" Purple="\" LPurple="\" Brown="\" Yellow="\" LGray="\" White="\" Reset="\" PS1="$Yellow\u@\h $LBlue\w... (4 Replies)
Discussion started by: Jotne
4 Replies

8. UNIX for Advanced & Expert Users

Libvirt does not work correctly anymore on my gentoo

Hi, Since a year my libvirtd does not work anymore on my Gentoodesktop. In the meantime a used virtualbox. But I would like to have back libvirt. The problem was after libvirt should not only work with root privileges. I deinstalled all things with libvirt an kvm. I removed all things from /var... (4 Replies)
Discussion started by: darktux
4 Replies

9. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies

10. Shell Programming and Scripting

Exit 1 doesn't work

Hi tail -f $PROGPATH/NBU_pgbaserestore_$1.log | while read LOGLINE do if ] && ! ] then date "+%d.%B.%Y %H:%M:%S" echo "ERROR: NBU" echo "$LOGLINE" TAILKILL=$(pgrep -P $$ -x tail) kill -9 $TAILKILL exit 1 ... (3 Replies)
Discussion started by: kvaikla
3 Replies
PG_TRACE(3)															       PG_TRACE(3)

pg_trace - Enable tracing a PostgreSQL connection

SYNOPSIS
bool pg_trace (string $pathname, [string $mode = "w"], [resource $connection]) DESCRIPTION
pg_trace(3) enables tracing of the PostgreSQL frontend/backend communication to a file. To fully understand the results, one needs to be familiar with the internals of PostgreSQL communication protocol. For those who are not, it can still be useful for tracing errors in queries sent to the server, you could do for example grep '^To backend' trace.log and see what queries actually were sent to the PostgreSQL server. For more information, refer to the PostgreSQL Documentation. PARAMETERS
o $pathname - The full path and file name of the file in which to write the trace log. Same as in fopen(3). o $mode - An optional file access mode, same as for fopen(3). o $connection - PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection is the last connection made by pg_connect(3) or pg_pconnect(3). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 pg_trace(3) example <?php $pgsql_conn = pg_connect("dbname=mark host=localhost"); if ($pgsql_conn) { pg_trace('/tmp/trace.log', 'w', $pgsql_conn); pg_query("SELECT 1"); pg_untrace($pgsql_conn); // Now /tmp/trace.log will contain backend communication } else { print pg_last_error($pgsql_conn); exit; } ?> SEE ALSO
fopen(3), pg_untrace(3). PHP Documentation Group PG_TRACE(3)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy