LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 11-22-2019, 05:22 PM   #16
reddog83
Member
 
Registered: Apr 2018
Distribution: Slackware 15.0/Current
Posts: 443

Rep: Reputation: 229Reputation: 229Reputation: 229

I was woundering if you could share the complete autoupdate script.


Quote:
Originally Posted by upnort View Post
A similar discussion here.

Many people rely heavily on memory muscle. As much as possible configure the desktop environment to look like her Mac desktop. Configure desktop icons the same as her previous system so she can find familiar apps.


As long as you are providing support then managing updates is irrelevant to her.

Slackware can be configured to auto-update all packages, including the kernel. A glitch with auto updating the kernel is, unlike almost all other distros, Slackware does not support auto-updating the boot loader.

Slackware does not directly support more than one kernel. On almost all other distros at least one previous kernel is preserved in case the newest kernel causes problems.

Below is a snippet I use in a script to update systems. Standard disclaimers apply.

Code:
MOST_RECENT_CHANGE_LOG_PKG="`grep ^patches /var/lib/slackpkg/ChangeLog.txt | head -n1 | sed 's|^patches/packages/||' | awk -F ':' '{print $1}' | sed 's|\.t.*||'`"
echo "Most recent change log package: $MOST_RECENT_CHANGE_LOG_PKG"
MOST_RECENT_INSTALLED_PKG="`/bin/ls -tr -1 /var/log/packages | tail -n1 2>/dev/null`"
echo "Most recent installed package: $MOST_RECENT_INSTALLED_PKG"
echo y | slackpkg update
if [ "$MOST_RECENT_INSTALLED_PKG" != "$MOST_RECENT_CHANGE_LOG_PKG" ]; then
  if [ "$AUTO" = "true" ]; then
    slackpkg -batch=on -default_answer=y install-new
    slackpkg -batch=on -default_answer=y upgrade-all
  else
    #if [ "$MOST_RECENT_CHANGE_LOG_PKG" = "" ]; then
      # A Slackware Current system.
      slackpkg install-new
    #fi
    slackpkg upgrade-all
  fi
fi
# Check again to see if the user actually updated the system.
MOST_RECENT_INSTALLED_PKG_NEW="`/bin/ls -tr -1 /var/log/packages | tail -n1 2>/dev/null`"
echo "Previous most recent installed package: $MOST_RECENT_INSTALLED_PKG"
echo "Most recent installed package: $MOST_RECENT_INSTALLED_PKG_NEW"
if [ "$MOST_RECENT_INSTALLED_PKG" = "$MOST_RECENT_INSTALLED_PKG_NEW" ]; then
  # The system was not updated.
  SYSTEM_UPDATED="false"
else
  # The system was updated.
  SYSTEM_UPDATED="true"
fi
DOTNEW="`find /etc -name '*.new'`"
if [ "$DOTNEW" != "" ]; then
  echo -e "There are *.new files in /etc.\n\n$DOTNEW"
  echo
fi
if [ ! -r /boot/grub/grub.cfg ]; then
  # Using LILO.
  KERNEL_RELEASE="`uname -r`"
  KERNEL_INSTALLED="`readlink /boot/vmlinuz-generic | cut -d '-' -f 3`"
  if [ "$KERNEL_INSTALLED" != "" ] && [ "$KERNEL_INSTALLED" != "$KERNEL_RELEASE" ]; then
    # Kernel update.
    ROOT_PARTITION=`grep -w root /etc/lilo.conf | grep = | awk '{print $3}'`
    mkinitrd -c -k $KERNEL_INSTALLED -m ext4 -f ext4 -r $ROOT_PARTITION -o /boot/initrd-${KERNEL_INSTALLED}.gz
    if [ -f /boot/initrd-$KERNEL_INSTALLED ] && [ -f /boot/initrd-$KERNEL_RELEASE ]; then
      # Remove the old initrd.
      rm -f /boot/initrd-$KERNEL_RELEASE
    fi
    echo -e "${BOLDWHITE}Updating lilo.${COLOR_RESET}"
    sed -i "s|$KERNEL_RELEASE|$KERNEL_INSTALLED|g" /etc/lilo.conf
    /sbin/lilo
    LILO_UPDATED="true"
  fi
fi
 
Old 11-22-2019, 10:53 PM   #17
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
Quote:
I was wondering if you could share the complete autoupdate script.
I wrote the script for the job to support Debian, Proxmox, and CentOS systems. We have a mix of bare metal and virtual systems but only about 18 total. Unlike a hosting company where there are hundreds or thousands of the same systems that could be updated with Ansible, each of our systems is unique. The script addresses those differences and has evolved for three years.

Although Slackware is not used at work, along the way I added Slackware to support myself at home. I'm lazy.

What I posted is the Slackware components of the script. So nothing more to post that is Slackware related.

Other than certain packages such as kernels, most of the time I run the script with the auto parameter (system-update auto). I don't pretend that the code is the most efficient or elegant, but I've been using the script for more than a year at home. No hiccups ever.

I use GRUB on all of my systems except my Current VM where I use Lilo. That exception is because Lilo is the default boot loader. I only use the VM to help with some nominal upstream testing. Hence the Lilo section. Without that section I would forget to update lilo.conf almost every time.

Last edited by upnort; 11-22-2019 at 10:55 PM.
 
Old 11-25-2019, 11:14 AM   #18
jrch
Member
 
Registered: Mar 2006
Posts: 158

Rep: Reputation: 15
boot to xfce ?

Hello Stormchaser,

I just (1-2 months ago) switched my wife to Slack 14.2; win7 machine died and do not want any later windows on our machines.

I'm curious how you set up her machine to boot into xfce. There are several suggested methods, which I have not as yet adopted.

Not to criticize here, just looking for information on what works for you. Thanks.

jrc
 
Old 11-26-2019, 02:12 PM   #19
baumei
Member
 
Registered: Feb 2019
Location: USA; North Carolina
Distribution: Slackware 15.0 (replacing 14.2)
Posts: 365

Rep: Reputation: 124Reputation: 124
Hi "jrch",

What I do for the computers which I want to change from booting to the command line (which I use during setup) to booting to Xfce, is edit these two files as root:

/etc/inittab
Change line #25 to be:
id:4:initdefault:

/etc/rc.d/rc.4
Comment out the first four stanzas, leaving the last stanza (about xdm) in effect.
 
1 members found this post helpful.
Old 11-27-2019, 03:42 PM   #20
ChuangTzu
Senior Member
 
Registered: May 2015
Location: Where ever needed
Distribution: Slackware/Salix while testing others
Posts: 1,718

Rep: Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857Reputation: 1857
Quote:
Originally Posted by cwizardone View Post
If it works, why not Slackware.

Add whatever she needs, e.g., LibreOffice and it should serve her well.
I would use -current or upgrade to Slackware-15 as soon as it is released.
OTOH, if the hardware is old enough, 14.2 should be just fine.
Granny on -current.... I don't know if that's tongue in cheek or a great call name for v.15.

OP, great job. I think Slackware is a great option, especially since she will not be overwhelmed with daily updates/upgrades etc... Agreed about keeping it fairly simple, add Libreoffice from Alien, perhaps setup an email client (claws-mail), VLC if she watches movies on the computer, password manager, firewall (Alien's script or UFW) and she should have all she needs.

PS: maybe a streamtuner set to VLC so she can listen to her favorite music.
 
1 members found this post helpful.
  


Reply



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
Custom Skype UI for completely senile grandmother rainland Linux - Desktop 9 04-27-2015 02:03 PM
LXer: Designing The Ultimate Grandmother-Ready Computer LXer Syndicated Linux News 0 12-31-2010 02:40 PM
LXer: Linux Installation Guide: So easy, even your grandmother could do it! LXer Syndicated Linux News 0 05-20-2008 07:10 PM
LXer: 86 Year Old Great-Grandmother Hoists The Jolly Roger LXer Syndicated Linux News 1 05-18-2006 01:50 PM
systemtrash : would you put your grandmother on linux ? systemtrash General 16 04-05-2006 02:24 PM

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

All times are GMT -5. The time now is 06:54 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