LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-31-2018, 05:21 AM   #1
eindemwort
Member
 
Registered: Dec 2017
Location: Regensburg, DE
Distribution: Slackware -current
Posts: 35

Rep: Reputation: Disabled
rc.ntpd file deleted


Hello,

I deleted my rc.ntpf file under the /etc/rc.d directory by -a very bad- mistake.
Does anybody know how or from where can I get it again?
I tried removing and installing again ntp, but the file is still missing.

I am running Slackware 14.2.

Thanks.
 
Old 03-31-2018, 05:43 AM   #2
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 915

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
You mean rc.ntpd (not rc.ntpf)? The ntp package contains etc/rc.d/rc.ntpd.new which is automagically renamed in a new installation, in other cases it's left as is for the admin to deal with appropriately. Maybe you just need to change the name.

chris
 
Old 03-31-2018, 05:51 AM   #3
heyjann
Member
 
Registered: Dec 2015
Posts: 102

Rep: Reputation: Disabled
Doesn't sound like that bad a mistake to me.
This may work:

First open a terminal window if you are not in a console already.
If necessary become root by doing
Code:
su -
Then
Code:
cd /etc/rc.d
wget http://bear.alienbase.nl/mirrors/slackware/slackware64-14.2/source/n/ntp/rc.ntpd
chmod +x ./rc.ntpd
(the chmod command makes the file executable which I assume you want)
 
1 members found this post helpful.
Old 03-31-2018, 10:27 AM   #4
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware, OpenBSD
Posts: 305

Rep: Reputation: 53
As Chris.Willing said above you may need to rename the ntpd file created in /etc/rc.d, and make it executable.
 
Old 03-31-2018, 02:12 PM   #5
eindemwort
Member
 
Registered: Dec 2017
Location: Regensburg, DE
Distribution: Slackware -current
Posts: 35

Original Poster
Rep: Reputation: Disabled
Hello!

After installing the ntp package I got no .new file.
So, I ended up downloading it as heyjann suggested - Thanks by the way!!!
 
Old 03-31-2018, 02:12 PM   #6
eindemwort
Member
 
Registered: Dec 2017
Location: Regensburg, DE
Distribution: Slackware -current
Posts: 35

Original Poster
Rep: Reputation: Disabled
And of course. Thanks to all of you for your replies.
 
Old 04-01-2018, 08:06 AM   #7
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 915

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Good that the problem is fixed. However I'm intrigued about rc.ntpd not appearing after reinstalling the ntp package. I just did the whole thing of removing rc.ntpd and then reinstalling the package and everything worked as expected (rc.ntpd was restored). I wonder what was different in your case? Here is my output of my session:

Code:
root@sl64-142-vmbuilder:~# rm /etc/rc.d/rc.ntpd
root@sl64-142-vmbuilder:~# ls -l !$
ls -l /etc/rc.d/rc.ntpd
/bin/ls: cannot access '/etc/rc.d/rc.ntpd': No such file or directory
root@sl64-142-vmbuilder:~# upgradepkg --reinstall patches/packages/ntp-4.2.8p11-x86_64-1_slack14.2.txz

+==============================================================================
| Upgrading ntp-4.2.8p11-x86_64-1_slack14.2 package using patches/packages/ntp-4.2.8p11-x86_64-1_slack14.2.txz
+==============================================================================

Pre-installing package ntp-4.2.8p11-x86_64-1_slack14.2...

Removing package /var/log/packages/ntp-4.2.8p11-x86_64-1_slack14.2-upgraded-2018-04-01,22:53:24...

Verifying package ntp-4.2.8p11-x86_64-1_slack14.2.txz.
Installing package ntp-4.2.8p11-x86_64-1_slack14.2.txz:
PACKAGE DESCRIPTION:
# ntp (Network Time Protocol daemon)
#
# The Network Time Protocol (NTP) is used to synchronize the time of a
# computer client or server to another server or reference time source,
# such as a radio or satellite receiver or modem. It provides client
# accuracies typically within a millisecond on LANs and up to a few tens
# of milliseconds on WANs relative to a primary server synchronized to
# Coordinated Universal Time (UTC) via a Global Positioning Service
# (GPS) receiver, for example.
#
Executing install script for ntp-4.2.8p11-x86_64-1_slack14.2.txz.
Package ntp-4.2.8p11-x86_64-1_slack14.2.txz installed.

Package ntp-4.2.8p11-x86_64-1_slack14.2 upgraded with new package patches/packages/ntp-4.2.8p11-x86_64-1_slack14.2.txz.

root@sl64-142-vmbuilder:~# ls -l /etc/rc.d/rc.ntpd
-rw-r--r-- 1 root root 804 Mar  1 09:47 /etc/rc.d/rc.ntpd
root@sl64-142-vmbuilder:~#
Did you do your reinstallation (the one that failed to restore your rc.ntpd file) very differently to the above?

chris
 
Old 04-02-2018, 03:36 AM   #8
eindemwort
Member
 
Registered: Dec 2017
Location: Regensburg, DE
Distribution: Slackware -current
Posts: 35

Original Poster
Rep: Reputation: Disabled
Hi Chris,

Yes I did it differently - meaning, using different commands.
First of all, I removed the ntp package:
Code:
slackpkg remove npt
Then I reinstalled it this way:
Code:
slackpkg install ntp
I ran these commands as root.
I wasn't aware of the upgradepkg command that you used.

In any case, after reading your reply I was dubious about what I did, because the command you used should do the same as the command I used (my assumption). So I decided to double check that what I did was really giving me the result I stated in my previous post.
So, I removed the file and followed my initial stpes (trying to remove the package and install it using slackpkg), but I found out the package was not installed, which might be the reason why there was no file after such installation. I think I didn't noticed it the first time. This is what I got:
Code:
                        Downloading ftp://sunsite.informatik.rwth-aachen.de/pub/comp/Linux/slackware/slackware64-14.2/./patches/packages/ntp-4.2.8p10-x86_64-1_slack14.2.txz.asc...
--2018-04-02 10:25:04--  ftp://sunsite.informatik.rwth-aachen.de/pub/comp/Linux/slackware/slackware64-14.2/patches/packages/ntp-4.2.8p10-x86_64-1_slack14.2.txz.asc
           => '/var/cache/packages/./patches/packages/ntp-4.2.8p10-x86_64-1_slack14.2.txz.asc'
Resolving sunsite.informatik.rwth-aachen.de... 137.226.34.227
Connecting to sunsite.informatik.rwth-aachen.de|137.226.34.227|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/comp/Linux/slackware/slackware64-14.2/patches/packages ... done.
==> SIZE ntp-4.2.8p10-x86_64-1_slack14.2.txz.asc ... done.

==> PASV ... done.    ==> RETR ntp-4.2.8p10-x86_64-1_slack14.2.txz.asc ...
No such file 'ntp-4.2.8p10-x86_64-1_slack14.2.txz.asc'.

        ERROR - Package not installed! md5sum error!

Searching for NEW configuration files
                No .new files found.


==============================================================================
WARNING!        WARNING!        WARNING!        WARNING!        WARNING!
==============================================================================
One or more errors occurred while slackpkg was running:

ntp-4.2.8p10-x86_64-1_slack14.2.txz:    md5sum
ntp-4.2.8p10-x86_64-1_slack14.2.txz:    md5sum

=============================================================================
That means, that I didn't have the package, just the file that I downloaded with the wget command.

I tried the command you used, but it is also not working.
Maybe I am using an outdated or incomplete repository?

Greetings.
 
Old 04-02-2018, 05:08 AM   #9
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 915

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by eindemwort View Post
Code:
[snip]

        ERROR - Package not installed! md5sum error!

Searching for NEW configuration files
                No .new files found.


==============================================================================
WARNING!        WARNING!        WARNING!        WARNING!        WARNING!
==============================================================================
One or more errors occurred while slackpkg was running:

ntp-4.2.8p10-x86_64-1_slack14.2.txz:    md5sum
ntp-4.2.8p10-x86_64-1_slack14.2.txz:    md5sum

=============================================================================
That means, that I didn't have the package, just the file that I downloaded with the wget command.
Yes, that certainly explains why reinstalling the package didn't give you a new rc.ntpd file (because the package hadn't actually been reinstalled) and, as you say, having a new rc.ntpd file without the actual package being installed won't work either.



Quote:
I tried the command you used, but it is also not working.
You've been using slackpkg which tries to download packages via the network, whereas the upgradepkg command assumes the package is available in the local file system. If the package file isn't there, upgradepkg will fail.

Quote:
Maybe I am using an outdated or incomplete repository?
Yes, it looks that way and, since I don't use it, I won't try to suggest how to fix it. I would suggest using wget to retrieve the entire package - something like:
wget http://ftp.slackware.com/pub/slackwa..._slack14.2.txz
which will copy the package file into your current directory; then install it with:
upgradepkg --install --reinstall ntp-4.2.8p11-x86_64-1_slack14.2.txz

Feel free to verify the package inegrity before installing it with:
wget http://ftp.slackware.com/pub/slackwa...ck14.2.txz.asc
gpg --verify ntp-4.2.8p11-x86_64-1_slack14.2.txz.asc
chris
 
1 members found this post helpful.
Old 04-02-2018, 05:20 AM   #10
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,785

Rep: Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460Reputation: 1460
Quote:
Originally Posted by eindemwort View Post
Code:
                        Downloading ftp://sunsite.informatik.rwth-aachen.de/pub/comp/Linux/slackware/slackware64-14.2/./patches/packages/ntp-4.2.8p10-x86_64-1_slack14.2.txz.asc...
There is no 4.2.8p10 because a month ago 4.2.8p11 replaced it. You didn't give command 'slackpkg update', did you? That will download a current file list.
 
1 members found this post helpful.
Old 04-07-2018, 05:01 AM   #11
eindemwort
Member
 
Registered: Dec 2017
Location: Regensburg, DE
Distribution: Slackware -current
Posts: 35

Original Poster
Rep: Reputation: Disabled
Hi!

Thanks Petri Kaukasoina. As you mentioned, I needed to update to the new version.
Thank you!
Thank you also Chris.Willing!
 
  


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
Error:--ntpd dead but pid file exists srijivdimri Linux - Newbie 1 10-02-2013 04:52 PM
[SOLVED] ntpd dead but pid file exists Stannley Linux - Newbie 7 09-11-2013 12:32 PM
Deleted log file - how to get back via file descriptor and keep alive? prollocks Linux - General 1 05-29-2009 09:08 AM
Need help to recover Deleted file - (file was saved in doc) Pravab Ubuntu 2 08-17-2008 10:57 AM
ntpd dead but pid file exists wjn Linux - Networking 15 05-22-2005 12:32 PM

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

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