LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-25-2020, 08:16 AM   #1
unInstance
Member
 
Registered: Jan 2020
Distribution: Slackware/FreeBSD
Posts: 61

Rep: Reputation: Disabled
rc.*.oring files


What are rc.*.orig files in /etc/rc.d?
Where do they come from?
Do they have to have executable permission?
 
Old 03-25-2020, 08:24 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 3,301

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Some package managers save the original file so they don't clobber local changes, but those are not typically called '.orig'. That name is frequently used by admins who manually edit a config file and want to keep the original around for reference. I don't know of any code or script that does that.
 
1 members found this post helpful.
Old 03-25-2020, 08:38 AM   #3
0XBF
Member
 
Registered: Nov 2018
Location: Winnipeg
Distribution: Slackware
Posts: 136

Rep: Reputation: 101Reputation: 101
Those files are put there when you run slackpkg upgrades. The ones in rc.d in particular come from the sysvinit-scripts package. When you upgrade that package the new scripts come in as *.new (e.g. rc.local.new) The extensions are then changed depending on what you do when slackpkg asks "what to do with new config files". If you choose to "overwrite" then the *.new files are mv'd to the actual file names and the old scripts are mv'd to *.orig names.

Check out what the slackpkg script does in /usr/libexec/slackpkg/functions.d/post-functions.sh if you want the gory details.

Also if you "ls -l" you will see that the ones that were executable before the rename are still executable after. Shouldn't matter since only the script with the proper filename will run.

Last edited by 0XBF; 03-25-2020 at 08:42 AM.
 
3 members found this post helpful.
Old 03-25-2020, 08:40 AM   #4
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,100

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Quote:
Originally Posted by unInstance View Post
What are rc.*.orig files in /etc/rc.d?
Where do they come from?
Do they have to have executable permission?
From 'man slackpkg.conf'
Code:
       ORIG_BACKUPS
            During integration of .new files during the post installation phase, original files are backed up to a file name with a
            .orig extension.  To prevent this, set this option to "off" and note that you will no longer have a copy of the content
            of the file prior to it being replaced by the .new version.

            The  default  value  of  ORIG_BACKUPS  is "on".  Only change this if you are sure you don't want backups of overwritten
            files.
            From the command line, you can use -orig_backups=value.
They will have the same permissions as the original versions. They won't execute since they are never called on.

Last edited by chrisretusn; 03-25-2020 at 08:43 AM. Reason: The to They
 
2 members found this post helpful.
Old 03-25-2020, 12:54 PM   #5
tadgy
Member
 
Registered: May 2018
Location: UK
Distribution: Slackware (servers), Ubuntu LXDE (desktop/laptop)
Posts: 75

Rep: Reputation: 85
Quote:
Originally Posted by chrisretusn View Post
From 'man slackpkg.conf'
Code:
       ORIG_BACKUPS
            During integration of .new files during the post installation phase, original files are backed up to a file name with a
            .orig extension.  To prevent this, set this option to "off" and note that you will no longer have a copy of the content
            of the file prior to it being replaced by the .new version.

            The  default  value  of  ORIG_BACKUPS  is "on".  Only change this if you are sure you don't want backups of overwritten
            files.
            From the command line, you can use -orig_backups=value.
They will have the same permissions as the original versions. They won't execute since they are never called on.
My patch to enable the above option is only available from Robby's git master repo, or in one of the slackpkg beta releases - it should transition into the main tree on the next slackpkg update.
 
Old 03-25-2020, 03:06 PM   #6
redneonglow
Member
 
Registered: Feb 2020
Location: PA
Distribution: Gentoo, Slackware
Posts: 46

Rep: Reputation: 16
Lightbulb

Quote:
Originally Posted by smallpond View Post
Some package managers save the original file so they don't clobber local changes, but those are not typically called '.orig'. That name is frequently used by admins who manually edit a config file and want to keep the original around for reference. I don't know of any code or script that does that.
I always use ".original" for this purpose to avoid conflicts with Slackware package upgrades.
 
Old 03-26-2020, 04:53 AM   #7
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,100

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Quote:
Originally Posted by tadgy View Post
My patch to enable the above option is only available from Robby's git master repo, or in one of the slackpkg beta releases - it should transition into the main tree on the next slackpkg update.
Oops

Yeah I am using slackpkg - version 2.84.0_beta8

Yet those files have been around for ages. Long before I started testing the beta. As mentioned above they are created in post-functions.sh

Last edited by chrisretusn; 03-26-2020 at 07:29 AM.
 
  


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
Restored files symbolically link to backup files, & can't boot using linked files mazinoz Linux Mint 1 01-31-2015 05:10 AM
need to rsync only selected files (--files-from) also need to delete files on dest. ? BrianK Linux - General 5 10-22-2009 09:52 PM
in copy files or ls files the command want to invert select some files how to?? hocheetiong Linux - Newbie 3 06-27-2008 06:32 AM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 02:38 AM
How to use .spm files (Source Package Files) concoran Linux - General 1 06-10-2001 02:09 PM

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

All times are GMT -5. The time now is 07:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration