Fedora This forum is for the discussion of the Fedora Project. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-29-2006, 05:29 PM
|
#1
|
Member
Registered: Aug 2006
Posts: 87
Rep:
|
YUM via SSH
If I am in the middle of a YUM upgrade and I get disconnected, does it continue yumming? 
|
|
|
08-29-2006, 10:45 PM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
Not normally. However, when performing remote maintenance operations, the 'screen' command is your friend. You can run multiple terminal sessions from a single login, disconnect (intentionally or accidentally), and reconnect (even from another computer at another location). The man page has all the info, but here's all you need:
1- Login as normal (via ssh, or even with a local terminal session)
2- Issue the command: screen
3- You now have what appears to be a normal session, but notice the titlebar has changed
4- To add an addition session: ctrl-a,c (ctrl-a followed by hitting the letter 'c')
5- To end a session, exit as you normally would. You will drop back to other sessions, until you finally exit screen.
6- To switch sessions: ctrl-a,number (where number is the session - for example ctrl-a,1 or ctrl-a,2)
7- To disconnect: ctrl-a,d
8- To reconnect to a disconnected screen: screen -r (if there are multiple disconnected screens, you will be presented with a list).
|
|
|
08-30-2006, 09:05 AM
|
#3
|
Member
Registered: Aug 2006
Posts: 87
Original Poster
Rep:
|
OK, well, I will find out soon if anything came of it. I had dropped the connection while in the middle of the update. The console is totally dead, no keyboard, mouse, or video, but ssh works fine. Happened in the middle of update through the gui.
|
|
|
08-30-2006, 09:26 AM
|
#4
|
Member
Registered: Aug 2006
Posts: 87
Original Poster
Rep:
|
OK, I was able to log back in and did the screen command, worked like a charm, but tried to run YUM and got this.
# yum -y update
Loading "installonlyn" plugin
Existing lock /var/run/yum.pid: another copy is running. Aborting.
Hmm, is there any way to re-establish connection to that session?
|
|
|
08-30-2006, 11:23 AM
|
#5
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
First, check to see if another process is actually running:
ps -Afl | grep yum
If so, then kill it: 'killall yum'. If that doesn't work (the process still shows in the 'ps' command), then 'killall -9 yum'.
If not, then the process did not clean up its lock file. Just remove it with 'rm -f /var/run/yum.pid'.
You should also clean the partially updated cache: 'yum clean all'.
You can rerun the yum command now.
|
|
|
08-30-2006, 01:00 PM
|
#6
|
Member
Registered: Aug 2006
Posts: 87
Original Poster
Rep:
|
Excellent, works and I tested it running YUM and I was able to disconnect and then return to the session. 
|
|
|
All times are GMT -5. The time now is 12:27 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|