LinuxQuestions.org
Help answer threads with 0 replies.
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 03-25-2020, 08:16 AM   #1
unInstance
Member
 
Registered: Jan 2020
Distribution: Slackware
Posts: 161

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: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
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
Distribution: Slackware
Posts: 765

Rep: Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862Reputation: 862
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: 2,967

Rep: Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545
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), Void (desktop/laptop)
Posts: 299

Rep: Reputation: 401Reputation: 401Reputation: 401Reputation: 401Reputation: 401
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: 75

Rep: Reputation: 24
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: 2,967

Rep: Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545Reputation: 1545
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



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 06:05 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
Open Source Consulting | Domain Registration