SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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?
[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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.