LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-09-2016, 06:14 AM   #1
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 370

Rep: Reputation: Disabled
Does anyone know of a good reason not to link /etc/localtime?


Does anyone have any reasons why

Code:
 ln -s /usr/share/zoneinfo/America/Austin /etc/localtime
...would be a bad idea?



As opposed to Slackware's official method:

Code:
cp /usr/share/zoneinfo/America/Austin /etc/localtime
 
Old 11-09-2016, 06:19 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
In case /usr is on a separate partition?
 
2 members found this post helpful.
Old 11-09-2016, 09:24 AM   #3
bormant
Member
 
Registered: Jan 2008
Posts: 426

Rep: Reputation: 240Reputation: 240Reputation: 240
arfon,
Slackware's official method (timeconfig) is
Code:
cp /usr/share/zoneinfo/America/Austin /etc/localtime
ln -s /usr/share/zoneinfo/America/Austin /etc/localtime-copied-from
Only root partition is mounted when /etc/localtime is used in boot sequence.
 
1 members found this post helpful.
Old 11-09-2016, 08:46 PM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Emerson View Post
In case /usr is on a separate partition?
A symlink won't have a problem with that. (A hard link would.)
 
Old 11-09-2016, 09:15 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Symlink pointing to a filesystem that is not mounted yet?
 
1 members found this post helpful.
Old 11-10-2016, 04:38 AM   #6
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
With all the shenanigans systemd/udev gets up to I think we have to accept that the days of the traditional approach of having /usr on a separate partition are behind us. While we can still get away with it doing it now, I'm not sure how sustainable it will be given the general direction the other distro are going in, and techniques like copying the localtime file are going to look increasingly "quaint".

On a similar note, I was recently trying to determine why my soundcard mixer settings weren't being restored by udev on startup. It turned out that it's because I have /var on a separate filesystem and /var/lib/alsa/asound.state isn't available when the udev rules that do the "alsactl restore" are run. So, I'm back to using good old rc.alsa!

Last edited by GazL; 11-10-2016 at 04:45 AM.
 
2 members found this post helpful.
Old 11-10-2016, 05:19 AM   #7
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,623

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by GazL View Post
With all the shenanigans systemd/udev gets up to I think we have to accept that the days of the traditional approach of having /usr on a separate partition are behind us. While we can still get away with it doing it now, I'm not sure how sustainable it will be given the general direction the other distro are going in, and techniques like copying the localtime file are going to look increasingly "quaint".

On a similar note, I was recently trying to determine why my soundcard mixer settings weren't being restored by udev on startup. It turned out that it's because I have /var on a separate filesystem and /var/lib/alsa/asound.state isn't available when the udev rules that do the "alsactl restore" are run. So, I'm back to using good old rc.alsa!
None of my desktop systems have /usr on a separate partition. ALL of my servers have separate partitions for /usr /var / and a data partition (sometimes /home). The system default behavior on most have been to use a link, but I trust a copy for exactly the reasons given above: "What is /usr is not mounted when that file is needed?". I use separate partitions specifically to make a system harder to break. Linking resources between partitions is setting yourself up for problems.

That said, I am moving my new builds to using /usr on the root partition. Disks are bigger, and /usr does not grow without bound using the newer packages. /var can (the cache stuff for mail, printer, software, etc. drives this behavior), so I still split /var off. If you are not putting /usr on a separate partition, then link away.
 
Old 11-10-2016, 05:51 AM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
The point I was making is that these days, if /usr isn't mounted then 'localtime' is just one of your worries.

I use separate /var, /tmp, /home and various /srv/* filesystems as IMO it makes sense to separate system software from general rw-data activity.

What is the point of separating /usr? In the old days it was for NFS mounting across a cluster or for support of diskless hosts. Unless you're still doing something like that I see no point in making your life complicated. But, each to their own...
 
1 members found this post helpful.
Old 11-10-2016, 09:31 PM   #9
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by bormant View Post
arfon,
Slackware's official method (timeconfig) is
Code:
cp /usr/share/zoneinfo/America/Austin /etc/localtime
ln -s /usr/share/zoneinfo/America/Austin /etc/localtime-copied-from
Only root partition is mounted when /etc/localtime is used in boot sequence.
That's an excellent reason!
 
  


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
LXer: Why there's no good reason to buy a Chromebook LXer Syndicated Linux News 0 11-12-2013 01:30 PM
What would you call a good reason to move into another country? SigTerm General 182 04-28-2011 09:37 AM
Updating to 2.6.16 kernel, is there a good reason to? BobNutfield Slackware 10 04-02-2006 05:43 PM
sshd starting for no good reason?! Randux Slackware 9 02-14-2006 04:47 PM
Now THIS is a good reason to avoid Windows Vista... Megamieuwsel General 34 10-15-2005 11:34 AM

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

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