LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-07-2015, 08:24 AM   #16
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656

Quote:
Originally Posted by Drakeo View Post
Make this simple if you are not going to upgrade version by version then do not use slackpkg. Why it is not made to do that. Second there is default parts of slackpkg that may cause issues.
if you want to skip versions use the kiss method Pat has laid out to you. and after you clean up you may want to re run the script kept here. http://carroll.cac.psu.edu/pub/linux....1/UPGRADE.TXT and look at the changes from http://carroll.cac.psu.edu/pub/linux....0/UPGRADE.TXT
those things will need to be done. write a script and KISS your way through it.
Code:
    #!/bin/sh
    for dir in a ap d e f k kde l n t tcl x xap xfce y ; do
      ( cd $dir ; upgradepkg --install-new *.t?z )
    done
Is there a benefit in doing a for loop versus just using wildcards for the folders? (Genuine question, I'm trying to expand my scripting knowledge)

Code:
upgradepkg --install-new */*.t?z
 
Old 08-07-2015, 08:41 AM   #17
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Originally Posted by bassmadrigal View Post
Is there a benefit in doing a for loop versus just using wildcards for the folders? (Genuine question, I'm trying to expand my scripting knowledge)

Code:
upgradepkg --install-new */*.t?z
It allows you to select only the specific folders you wish to install. As an example, when I do my upgrades, I skip KDE, KDEI.
 
1 members found this post helpful.
Old 08-07-2015, 09:04 AM   #18
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
Is there a benefit in doing a for loop versus just using wildcards for the folders?
There's one corner case: if there are lots of files, a wildcard can cause the shell's maximum allowable command line length to be exceeded (2097152 on slackware64-current, e.g. ~20,000 100-byte pathnames -- say, ten times more than all Slackware's packages) so a divide and conquer approach is sometimes necessary.

Going back to Drakeo's suggestion, there are many advantages of using slackpkg, including (but not limited to) checking md5sums and signatures, and doing glibc first. But for many years upgradepkg was all we had, and it's still good enough to form the basis of Pat's documented procedure in UPGRADE.TXT -- just make sure that you follow Pat's *entire* procedure from step 0 to step 9.
 
2 members found this post helpful.
Old 08-07-2015, 10:11 AM   #19
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Thanks to both of you for the info!
 
Old 08-07-2015, 01:15 PM   #20
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 288

Rep: Reputation: 155Reputation: 155
Quote:
Originally Posted by max_arbit View Post
That is so useful! I haven't used it yet though - have a couple of concerns. Like you state, password less root access to anybody on the network is probably not a good thing (because I am not on the local network and if i open root access, can lead to attacks). Is there a get around this, meaning I can make it have a password access or a key or something?
My script modifies the /etc/shadow file of the installer's initrd image to set the password. This appears in the following line:
Code:
sed -i 's?^root:.*?root:joFWnPF2bJhPc:0:0:::::?g' etc/shadow
The hash value in the above is for an empty password. You can supply a different hash value for a different password. For example, the following specifies a hash for a password of "123456":
Code:
sed -i 's?^root:.*?root:EuRG8Jp8OHb/.:0:0:::::?g' etc/shadow
I do not know of a simple way to generate the hash for a particular password; Slackware's installer is based on Busybox and password encryption for Busybox is different than that of Slackware proper (I believe Busybox uses DES and Slackware uses MD5, but I am not certain).

In order to create the hash for "123456" above, I booted into Slackware's installer (on my local desktop machine), changed root's password, and then copied the hash from /etc/shadow into the sed line of my make-headless-installer.sh script.

Quote:
Originally Posted by max_arbit View Post
Secondly, why do you say the IP address might change? The machine I am talking about uses DHCP server to get its IP and it's fixed for my MAC add. In this case, can I expect the IP to remain unchanged?
I expect you wouldn't have any problems. Unfortunately for me, my network uses an AT&T router (running Microsoft software) and doesn't seem to take MAC addresses into account when assigning IPs. I often have to use nmap to identify the remote server after it boots into the installer.

Last edited by saulgoode; 08-07-2015 at 01:28 PM.
 
Old 08-13-2015, 06:09 AM   #21
max_arbit
Member
 
Registered: Aug 2010
Posts: 50

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by 55020 View Post
If you don't have /sbin/kmod, either you didn't run "slackpkg install-new" or something went wrong and you didn't see it.
...
The extensive notes you quoted from hotchili are "abnormal". I hesitate to call them wrong, but normally, people should do "slackpkg install-new" *before* "slackpkg upgrade-all". This may be what went wrong.
That observation was spot on. @hotchili did mention that the instructions were from memory, so it was likely that some step was missed and this was it! I corrected that, and re-did the testing successfully and then did the actual upgrade of my remote system too - everything went perfectly!

Thanks everybody for their useful comments, tips and suggestions - very helpful indeed!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading ssh Anomander Slackware 6 03-14-2006 09:29 AM
Upgrading SSH HELP!!!!! ericpolanco Red Hat 0 11-29-2005 06:20 PM
Upgrading SSH kaplan71 Linux - Software 1 03-10-2005 09:23 PM
Upgrading SSH bryanjones Linux - Security 12 02-23-2005 08:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration