Sponsored Content
Full Discussion: Rsh reboot in a loop?
Top Forums Shell Programming and Scripting Rsh reboot in a loop? Post 303026133 by MuntyScrunt on Tuesday 20th of November 2018 03:28:46 PM
Old 11-20-2018
Ok, well incorporating those couple of things (I'm still using cat. I like cat. I have one!) does make a difference, it now loops for two nodes, it resets at least one of them, them closes my ssh to the header machine.

Just before my session is closed the error tcserror: Input/output error is thrown.

I have since tried nohup and disown, these do similar, they run for a couple of loops then just end.

I should add at this point I've checked and checked, there is no problem with my nodes file. So I continue to be confused.

The problem surely is I want to explicitly ignore "Connection lost', not an error. Connection lost isn't an error, is a loss of connection, it's not a return from the command.

So, now I'm very confused.

EDIT: pssh manages fine which is a python script, so it must be possible with bash surely?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

rsh command in a while loop

Hi , reading a "file1" with 2 data in each line (VAR1 and VAR2) , i'm using a while loop like this : cat file1|awk '{print $1,$2}'|while read VAR1 VA2 do echo $VAR1 echo $VAR2 done as this example shows , it works but if between do and done i use a "rsh" command , the script reads... (6 Replies)
Discussion started by: Nicol
6 Replies

2. Shell Programming and Scripting

rsh and for loop

hi I wanted to use the for loop structure in tandem with rsh command and the result to be redirected into a local .lst file within a shell script . Tried the following but does not help :confused: . rsh ABCD "cd /bosp/local/home/linus/;for i in `ls -ltr | grep ^- | awk {'print $9'}` do... (4 Replies)
Discussion started by: newbee2005
4 Replies

3. UNIX for Advanced & Expert Users

While read loop and rsh

Hi all I have a while read loop that I use to process a file line by line. The reason I am using this is due the fact that I have spaces in the line and a for loop treats the space as a delimeter for the next record. In this while loop I have a rsh. It appears that cos of the rsh, I never get... (1 Reply)
Discussion started by: 104234
1 Replies

4. Solaris

different between soft reboot and hard reboot

Hi Guru's Can any want here could explain to me the different between soft reboot and hard reboot . Best Regards Seelan (3 Replies)
Discussion started by: seelan3
3 Replies

5. Shell Programming and Scripting

rsh breaking me out of loop

Hey all I have two scripts, one script containing the guts of my code. The other simply loops through a list, calling the other script on each iteration. Problem is when I add the line `/usr/bin/rsh -l root $HOSTNAME ""` to my main script, the loop never seems to exectute any more... (1 Reply)
Discussion started by: mark007
1 Replies

6. AIX

Rsh

How to configure rsh for different users in aix? (4 Replies)
Discussion started by: vjm
4 Replies

7. Shell Programming and Scripting

rsh script with inside a for loop

hi everyone, I have the following problem: the foreach loop inside rsh doesn'work. I have tried the for command but it's not recognized. with the foreach command I don't receive any error, but it doesn't really make the cycle, ignoring the foreach and executing 1 time the echo command. Anyone has... (5 Replies)
Discussion started by: trekianov
5 Replies

8. Solaris

Reboot loop

Oh, how I regret having chosen Solaris... Really, when I had my last Solaris system ten years ago I was just happy. Like a tank: Slow, clumsy, ugly but rock-solid. Then there were 10 ten years of FreeBSD and OpenBSD. Simple install, fast, nice, good package managing, just running along. But... (11 Replies)
Discussion started by: PatrickBaer
11 Replies

9. Solaris

X2200 in reboot loop & mounting ZFS drive on other boxes

So I was patching a Solaris 10 U08 X86 X2200 box in preparation for an Oracle upgrade. Rebooted the box because the patches failed and the box will not boot successfully. I need to back up the zones on the 2 drives before going further. I pulled the drives and attempted to mount them on my Ubuntu... (0 Replies)
Discussion started by: LittleLebowski
0 Replies

10. Shell Programming and Scripting

awk, double variable, for loop and rsh

Hello folks, I've a (perhaps) simple question. In a text file I've : server_name1: directory1 server_name2: directory2 server_name3: directory3 I want to make a loop that lets me connect and operate on every server: rsh server_name1 "ls -l directory1" I've tried with awk,... (6 Replies)
Discussion started by: gogol_bordello
6 Replies
reboot(1M)																reboot(1M)

NAME
reboot - reboot the system SYNOPSIS
time] message] time] message] DESCRIPTION
The command terminates all currently executing processes except those essential to the system, then reboots the system, or halts, or makes the partition ready for reconfiguration. When invoked without arguments, syncs all disks before rebooting the system. Options The command recognizes the following options: Shut down the system and halt. Shut down the system and reboot automatically (default). Shut down the system to a ready-to-reconfigure state and reboot if possible. If the partition is unable to reboot, it will stop at a ready-to-reconfigure state. However, if the option is also specified, the system will always stop at ready-to-reconfigure state. This option is available only on systems that support hardware partitions. Shut down the system to a ready-to-reconfigure state and do not reboot. This option can be used only in combination with the option. This option is available only on systems that support hardware partitions. Do not sync the file systems before shutdown. The and options are ignored with this option. Sync the file systems before shutdown; for file systems that were cleanly mounted, modify the flag from to (default). Quick and quiet. Suppress broadcast of warning messages, terminate processes by brute force (with and immediately call with arguments as indicated by the other options (see reboot(2)). No logging is performed. The and options are ignored with this option. Specify what time will bring the system down. time can be the word (indicating immediate shutdown) or a future time in one of two for- mats: and The first form brings the system down in number minutes; the second brings the system down at the time of day indicated (based on a 24-hour clock). Display message at the terminals of all users on the system at decreasing intervals as reboot time approaches. The message must not contain any embedded double quotes. At shutdown time a message is written in the file (if it exists), containing the time of shutdown, who ran and the reason. Only users with appropriate privileges can execute the command. WARNINGS
does not invoke the shutdown scripts associated with subsystems to bring them down in a cautious manner. See shutdown(1M). If the option is used in a virtual partition environment on a partitionable system, then the requested reconfiguration will not take place until all the virtual partitions on that hard partition are shut down and the virtual partition monitor is rebooted. AUTHOR
was developed by HP and the University of California, Berkeley. FILES
Shutdown log SEE ALSO
vpartition(1), reboot(2), partition(5). reboot(1M)
All times are GMT -4. The time now is 11:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy