View previous topic :: View next topic |
Author |
Message |
bnorthcutt n00b


Joined: 03 Apr 2006 Posts: 72
|
Posted: Fri Apr 13, 2007 7:46 pm Post subject: <solved>Strange message during boot up |
|
|
I get this message during boot up
Code: |
one of t he files in /etc/{conf.d,init.d} has a modification time in the future
|
It pretty much does it for all my service in the init.d directory. Does any one know what this means or how I can fix it. I tried looking on google but I can not find anything. Thank you for any help.
b
Last edited by bnorthcutt on Fri Apr 13, 2007 8:41 pm; edited 1 time in total |
|
Back to top |
|
 |
erik258 Advocate


Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Fri Apr 13, 2007 7:53 pm Post subject: |
|
|
The problem has likely originated from you installing from a system with a clock that was fast. Try something like:
touch /etc/init.d/*
touch /etc/conf.d/*
after setting the clock properly. You may want to check out /etc/conf.d/clock -- I sometimes forget to sync the hardware clock to system time, and so the clock is off every time the computer reboots. That might be your problem -- the hardware clock on the computer was never set, so it's always behind.
Let me know if you need more help with /etc/conf.d/clock. _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
 |
wynn Advocate


Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Fri Apr 13, 2007 7:54 pm Post subject: |
|
|
There are a number of posts found with the search string "modification time in the future" all (it seems) with different causes and solutions.
Here's one ntp - YOU #$*%! ... Modification time in the future.: you may like to look at the others and see if any of the solutions suggested solve your problem. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
 |
rorin Retired Dev

Joined: 14 Mar 2004 Posts: 29 Location: Maine, USA
|
Posted: Fri Apr 13, 2007 7:58 pm Post subject: |
|
|
It probably means that your clock is messed up. For a quick fix, you can run:
Code: | find /etc | xargs touch |
What you really need to do though is make sure that /etc/conf.d/clock is set correctly, and that /etc/localtime is either a copy or link to the correct timezone information located in /usr/share/zoneinfo. Then I'd recommend getting ntp going. There is a tutorial on gentoo-wiki at http://gentoo-wiki.com/NTP. |
|
Back to top |
|
 |
bnorthcutt n00b


Joined: 03 Apr 2006 Posts: 72
|
Posted: Fri Apr 13, 2007 8:24 pm Post subject: |
|
|
I have tried all the the suggestions and still nothing seems to effect it. I do have ntp-client already in use. I made sure I copied the right timezone to /etc/localtime. I touch all the file in the init.d and conf.d directory. I've reboot at least 10 times to see the effect. I don't know what the deal is. |
|
Back to top |
|
 |
bnorthcutt n00b


Joined: 03 Apr 2006 Posts: 72
|
Posted: Fri Apr 13, 2007 8:41 pm Post subject: |
|
|
I got it fix finally. I don't know what really did it. I did change 2 setting in the /etc/conf.d/clock
1) I uncommented
I have no clue why that was commented
2) I put yes here
Code: |
CLOCK_SYSTOHC="yes"
|
I figured that might help.
Anyway thank you for all your guys/gals help. |
|
Back to top |
|
 |
erik258 Advocate


Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Fri Apr 13, 2007 8:42 pm Post subject: |
|
|
Have you checked to see the time in the BIOS? It might not be a bad idea to experiment with setting the right time there before you boot.
Quote: | made sure I copied the right timezone to /etc/localtime. |
That's not the way it's done anymore, i'm afraid. Put your timezone in /etc/conf.d/clock instead. I don't know why it changed, sorry.
Quote: | I do have ntp-client already in use. |
Good! you might want to use ntpd too to adjust your clock over time and adjust for network latency. I usually use ntp as well, since I have high speed, and then sync the hardware clock when i bring th system down so my hardware clock is right when I boot back up. Be persistent with setting the time -- restart ntp-client -- so you can make sure it get's synced to hardware. _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
 |
wynn Advocate


Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Sat Apr 14, 2007 10:21 am Post subject: |
|
|
erik258: Carlo in /etc/localtime being ignored... explains why the TIMEZONE variable has been added to /etc/conf.d/clock
rorin: you could be storing up trouble for yourself by Code: | find /etc | xargs touch | as portage/emerge uses the timestamps of the files to decide whether they can be deleted as "originals" or must be left as "modifieds".
Changing the timestamps would mean that every file affected would be left unchanged when something like sys-apps/sysvinit, sys-apps/baselayout or any other package that puts its configuration files into /etc is updated by emerge.
The proper way to do it ( ) is to find the files which have the wrong timestamps, find out the package or packages they belong to and then parse the packages' CONTENTS files in /var/db/pkg/<group>/<package> to get the correct timestamp and use it to set the files.
The implementation is left as an exercise for the reader.
(/me waiting to have my wrists slapped by a dev...) _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
 |
wynn Advocate


Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Sun Apr 15, 2007 9:34 am Post subject: |
|
|
"The implementation is left as an exercise for the reader."
Couldn't resist the challenge: here is a Perl script to check the timestamps and md5 signatures of files in /etc/conf.d and /etc/init.d Code: | #!/usr/bin/perl -w
# Check the md5 signature and timestamps of files in /etc/conf.d and
# /etc/init.d against /var/db/pkg CONTENTS
# Version 0.00 Sat Apr 14 17:12:01 BST 2007
# File lightfoot:~/Forums/portage/check-sig-and-time.pl
# $Log$
my $VERSION = 'Version 0.00 Sat Apr 14 17:12:01 BST 2007';
use strict;
use IO::File;
use Getopt::Long;
my $verbose = 0;
my $help;
sub Usage {
print <<_end_;
Check the md5 signature and timestamps of files in /etc/conf.d and /etc/init.d
against /var/db/pkg CONTENTS
Usage:
$0 [--verbose=0|1|2|3] [--help]
where verbose shows different levels of debugging information
help shows this text
_end_
exit(1);
}
sub collect_names {
my @dir = ( "/etc/init.d", "/etc/conf.d" );
my $dir;
my %files;
foreach $dir (@dir) {
opendir(DIR, $dir) || die "can't opendir $dir: $!";
my @dir_list = grep { ! /^\.\.?/ } readdir(DIR);
closedir DIR;
foreach (@dir_list) {
if (-f "$dir/$_" && (! -l "$dir/$_")) {
STDOUT->print("Adding the file $dir/$_\n") if $verbose > 1;
$files{"$dir/$_"} = [ ];
} else {
STDOUT->print("Skipping $dir/$_: not a file\n");
}
}
}
if ($verbose > 1) {
foreach (sort keys %files) {
STDOUT->print("$_: @{ $files{$_} }\n");
}
}
my $fh = IO::File->new("find /var/db/pkg -name CONTENTS |") or
die "Can't open find /var/db/pkg -name CONTENTS: $!, ";
my $contents;
while (($contents=$fh->getline)) {
my $fc = IO::File->new($contents) or
die "Can't open $contents: $!, ";
while (($_=$fc->getline)) {
next if ! /^obj /;
my @details = split;
$files{$details[1]} = [ substr($contents, 12, -10), @details[2..3] ]
if exists $files{$details[1]};
}
$fc->close;
}
$fh->close;
my %table;
my ($OK, $X, $QUERY) = (" OK", " X", " ?");
foreach (sort keys %files) {
STDOUT->print("$_: @{ $files{$_} }\n") if $verbose > 1;
my @details = @{ $files{$_} };
if (scalar @details) {
$table{$_} = [ $OK, $OK ];
my $md5 = (split " ", qx(/usr/bin/md5sum $_))[0];
if ($md5 ne $details[1]) {
STDOUT->print("$_:\n md5 $md5 ne '$details[1]'\n");
@{ $table{$_} }[0] = $X;
}
my $mtime = (stat $_)[9];
if ($mtime != $details[2]) {
STDOUT->print("$_: mtime $mtime ne '$details[2]'\n");
@{ $table{$_} }[1] = $X;
}
} else {
$table{$_} = [ $QUERY, $QUERY ];
}
}
if ($verbose) {
printf("%3s %3s %s\n", "md5sum", "mtime", " filename (package)");
foreach (sort keys %table) {
printf("%-6s %-6s %s (%s)\n",
@{ $table{$_}}[0], @{ $table{$_}}[1], $_,
@{ $files{$_} }[0]);
}
}
printf("%s\n",
"Files which do not belong to a package " .
"(package may have been unmerged)");
foreach (sort keys %files) {
my @details = @{ $files{$_} };
printf("%s\n", $_) if (scalar @details) == 0;
}
printf("\n%s\n%s\n",
"Files with a different md5 signature and/or timestamp " .
"(modified files)", " filename (package)");
foreach (sort keys %files) {
my @details = @{ $files{$_} };
printf("%s (%s)\n", $_, $details[0]) if @{ $table{$_} }[0] eq $X;
}
printf("\n%s\n%s\n",
"Files with a matching md5 signature but different timestamp " .
"(original files?)", " filename (package)");
foreach (sort keys %files) {
my @details = @{ $files{$_} };
printf("%s (%s)\n", $_, $details[0])
if (@{ $table{$_} }[0] eq $OK) && (@{ $table{$_} }[1] eq $X);
}
}
sub main {
unless ( GetOptions( "verbose:i" => \$verbose,
"help" => \$help) ) {
STDERR->print("GetOptions error: @ARGV\n");
}
STDOUT->print("$VERSION\n");
Usage() if defined($help);
if ( $verbose ) {
STDOUT->print("Verbose is $verbose.\n");
}
collect_names();
}
main();
__END__
Local Variables:
compile-command: "/usr/bin/perl -w check-sig-and-time.pl"
End: | and the output when run here is Code: | Version 0.00 Sat Apr 14 17:12:01 BST 2007
Skipping /etc/init.d/depscan.sh: not a file
Skipping /etc/init.d/functions.sh: not a file
Skipping /etc/init.d/net.eth0: not a file
Skipping /etc/init.d/runscript.sh: not a file
Skipping /etc/init.d/net.ath0: not a file
/etc/conf.d/clock:
md5 3cc4b7894b921c7471503783cf853bb2 ne 'c1b28bcefed999461339f58c204a32db'
/etc/conf.d/consolefont:
md5 656db4a784df7898ac4a9c8fa920dffb ne 'e8a4f42181bd18be8c3fc4f0a3e375c1'
/etc/conf.d/gpm:
md5 52f9a5df7e110f567ae53b5cff4f96c7 ne '5968cb47e493e348cf289b0dd1990f4a'
/etc/conf.d/gpm: mtime 1173264838 ne '1157811184'
/etc/conf.d/hostname:
md5 56204947d39052f6d94738156da6cf57 ne '7be9775da40c453bcb90c04079c8fc49'
/etc/conf.d/keymaps:
md5 b17bc8099a4fe454df49a4dfa8745fdc ne '91acadf029a0841f5fbc14e07eb5fdcc'
/etc/conf.d/local.start:
md5 478cc4078a855d061a0115206a19a4f9 ne 'dcff02ccc22c387b5726f27c80bae501'
/etc/conf.d/local.stop:
md5 0de2881072e4c5ab66252d630ce5b35b ne '6c6b7e0b38e38c2e8a5dfa6eb14c6c9f'
/etc/conf.d/ntpd:
md5 8b8627f3282d68f91f187face0932d38 ne '5e1591f145a63cf66ee20ab65495781a'
/etc/conf.d/ntpd: mtime 1173868152 ne '1173866343'
/etc/conf.d/rc:
md5 dc7b9b049e119431e9449140e2e26759 ne 'e6aae5ad2928b4e2f404f48c949df0f6'
/etc/init.d/modules: mtime 1176538613 ne '1176538579'
/etc/init.d/net.lo:
md5 e953e43cdbd1c1fc0f102fba0abe547c ne 'd1cd3f9da2acbc8fcc7f7746f412de93'
/etc/init.d/nscd: mtime 1170844045 ne '1170843931'
/etc/init.d/ntpd:
md5 58d2e6e5da919423d8408e2a10393ef7 ne '41b549e95a6201dce6229fd01070ffc1'
/etc/init.d/ntpd: mtime 1173867946 ne '1173866343'
/etc/init.d/syslog-ng: mtime 1170406923 ne '1170406155'
Files which do not belong to a package (package may have been unmerged)
/etc/conf.d/bttrack
/etc/conf.d/installed-local.start
/etc/conf.d/installed-local.stop
/etc/conf.d/kismet
/etc/conf.d/net-iwconfig
/etc/conf.d/net-with-wifi0-no-comments
/etc/conf.d/net-wpa
/etc/conf.d/net~
/etc/init.d/kismet
Files with a different md5 signature and/or timestamp (modified files)
filename (package)
/etc/conf.d/clock (sys-apps/baselayout-1.12.9-r2)
/etc/conf.d/consolefont (sys-apps/baselayout-1.12.9-r2)
/etc/conf.d/gpm (sys-libs/gpm-1.20.1-r5)
/etc/conf.d/hostname (sys-apps/baselayout-1.12.9-r2)
/etc/conf.d/keymaps (sys-apps/baselayout-1.12.9-r2)
/etc/conf.d/local.start (sys-apps/baselayout-1.12.9-r2)
/etc/conf.d/local.stop (sys-apps/baselayout-1.12.9-r2)
/etc/conf.d/ntpd (net-misc/ntp-4.2.4-r1)
/etc/conf.d/rc (sys-apps/baselayout-1.12.9-r2)
/etc/init.d/net.lo (sys-apps/baselayout-1.12.9-r2)
/etc/init.d/ntpd (net-misc/ntp-4.2.4-r1)
Files with a matching md5 signature but different timestamp (original files?)
filename (package)
/etc/init.d/modules (sys-apps/baselayout-1.12.9-r2)
/etc/init.d/nscd (sys-libs/glibc-2.5)
/etc/init.d/syslog-ng (app-admin/syslog-ng-1.6.11-r1) |
_________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|