LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-04-2016, 12:21 PM   #1
etpoole60
Member
 
Registered: Jan 2008
Posts: 111

Rep: Reputation: 0
Question CentOS6 to CentOS7 - How To?


My brother had to go out of town, so he left me with this situation and I need your help.

Rather than have many machines we have 4 large ones that we make multi-function.

One of the things we were doing sine CentOS5 was to place this bash script we wrote that did certain things based on your userid (i.e. we installed several versions of Sun Java and depending on what your userid is got get a different version). This meant we didn't have to modify every individual userid resource script.

Our issue is that in CentOS 7 there is no /etc/profile.d directory.

Where did it go? Can I define it and things work like they used to? IS there a new way to do this in CentOS 7 and if so where can I find the explanation?

TIA
Eugene
 
Old 05-04-2016, 01:25 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
/etc/profile.d itself is added by the package named "setup".

The contents of /etc/profile.d are added by various packages.

On your CENTOS6 you can run "rpm -qf /etc/profile.d" to determine the former.

You can then run "rpm -qf /etc/profile.d/*" to see which packages are adding other contents.

CentOS is a binary compile of RHEL7 source. Since I still have this on RHEL7 you ought to have it on CentOS7:

On my RHEL7 installation I still see /etc/profile.d and files in it such as:
-rw-r--r--. 1 root root 771 Sep 16 2015 256term.csh
-rw-r--r--. 1 root root 841 Sep 16 2015 256term.sh
-rw-r--r--. 1 root root 1298 Oct 30 2015 abrt-console-notification.sh
-rw-r--r--. 1 root root 660 Nov 25 2013 bash_completion.sh
-rw-r--r--. 1 root root 196 Apr 29 2015 colorgrep.csh
-rw-r--r--. 1 root root 201 Apr 29 2015 colorgrep.sh
-rw-r--r--. 1 root root 1741 Nov 25 10:50 colorls.csh
-rw-r--r--. 1 root root 1609 Nov 25 10:50 colorls.sh
-rw-r--r--. 1 root root 607 Nov 14 2014 kde.csh
-rw-r--r--. 1 root root 692 Nov 14 2014 kde.sh
-rw-r--r--. 1 root root 1706 Sep 16 2015 lang.csh
-rw-r--r--. 1 root root 2703 Sep 16 2015 lang.sh
-rw-r--r--. 1 root root 123 May 25 2015 less.csh
-rw-r--r--. 1 root root 121 May 25 2015 less.sh
-rw-r--r--. 1 root root 1157 Sep 14 2015 PackageKit.sh
-rw-r--r--. 1 root root 313 Jun 29 2012 qt-graphicssystem.csh
-rw-r--r--. 1 root root 379 Jun 13 2012 qt-graphicssystem.sh
-rw-r--r--. 1 root root 105 Jan 30 2014 vim.csh
-rw-r--r--. 1 root root 269 Jan 30 2014 vim.sh
-rw-r--r--. 1 root root 1940 Jul 1 2015 vte.sh
-rw-r--r--. 1 root root 164 Jan 27 2014 which2.csh
-rw-r--r--. 1 root root 169 Jan 27 2014 which2.sh

On running "rpm -qf /etc/profile.d/*" I see the various packages that have installed files there:
initscripts-9.49.30-1.el7.x86_64
initscripts-9.49.30-1.el7.x86_64
abrt-console-notification-2.1.11-35.el7.x86_64
bash-completion-2.1-6.el7.noarch
grep-2.20-2.el7.x86_64
grep-2.20-2.el7.x86_64
coreutils-8.22-15.el7_2.1.x86_64
coreutils-8.22-15.el7_2.1.x86_64
kde-settings-19-23.5.el7.noarch
kde-settings-19-23.5.el7.noarch
initscripts-9.49.30-1.el7.x86_64
initscripts-9.49.30-1.el7.x86_64
less-458-9.el7.x86_64
less-458-9.el7.x86_64
qt-settings-19-23.5.el7.noarch
qt-settings-19-23.5.el7.noarch
vim-enhanced-7.4.160-1.el7.x86_64
vim-enhanced-7.4.160-1.el7.x86_64
vte-profile-0.38.3-2.el7.x86_64
which-2.20-7.el7.x86_64
which-2.20-7.el7.x86_64

To see which package installed which of those files you could run the "rpm -qf" on the specific file.

Of course you could manually create the directory with "mkdir /etc/profile.d" then create whatever files you want.
 
Old 05-04-2016, 07:48 PM   #3
etpoole60
Member
 
Registered: Jan 2008
Posts: 111

Original Poster
Rep: Reputation: 0
You are correct! I think we had a error when we did the initial install, and he never rechecked when we reinstalled CentOS7

Thank You
Eugene
 
  


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
[SOLVED] CentOS6 to CentOS7 Ethernet Definition Question etpoole60 Linux - Networking 8 05-04-2016 04:17 PM
Kickstart issue in centos7 sakshi123 CentOS 2 03-02-2016 01:02 PM
How to install Centos7 manh12a3 Linux - Desktop 3 12-10-2015 01:29 AM
[SOLVED] VodafoneK4203 ( Huawei) on Centos7 jvermeulen Linux - Hardware 4 05-20-2015 02:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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