Browse Source

clockspeed: changed to put leapsecs data file into its original path in /etc

user/amery/next/luajit
Christian Wiese 13 years ago committed by Christian Wiese
parent
commit
dcf7f9cb35
  1. 32
      network/clockspeed/0005-use-localstatedir.patch
  2. 6
      network/clockspeed/clockspeed.conf

32
network/clockspeed/0005-use-localstatedir.patch

@ -68,38 +68,6 @@ index 18a7383..ec425bf 100644
now(&first); now(&first);
diff --git a/hier.c b/hier.c
index 3d66beb..5083582 100644
--- a/hier.c
+++ b/hier.c
@@ -2,11 +2,12 @@
void hier()
{
- c("/","etc","leapsecs.dat",-1,-1,0644);
+ d("/var/state","clockspeed",-1,-1,0755);
+
+ c("/","var/state/clockspeed","leapsecs.dat",-1,-1,0644);
h(auto_home,-1,-1,0755);
- d(auto_home,"etc",-1,-1,0755);
d(auto_home,"bin",-1,-1,0755);
d(auto_home,"man",-1,-1,0755);
d(auto_home,"man/man1",-1,-1,0755);
diff --git a/leapsecs_read.c b/leapsecs_read.c
index c8f975f..5266e60 100644
--- a/leapsecs_read.c
+++ b/leapsecs_read.c
@@ -17,7 +17,7 @@ int leapsecs_read()
int i;
struct tai u;
- fd = open("/etc/leapsecs.dat",O_RDONLY | O_NDELAY);
+ fd = open("/var/state/clockspeed/leapsecs.dat",O_RDONLY | O_NDELAY);
if (fd == -1) {
if (errno != ENOENT) return -1;
if (leapsecs) free(leapsecs);
-- --
1.6.6.2 1.6.6.2

6
network/clockspeed/clockspeed.conf

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# #
# Filename: package/.../clockspeed/clockspeed.conf # Filename: package/.../clockspeed/clockspeed.conf
# Copyright (C) 2008 - 2010 The OpenSDE Project # Copyright (C) 2008 - 2011 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project
# #
# More information can be found in the files COPYING and README. # More information can be found in the files COPYING and README.
@ -35,8 +35,8 @@ clockspeed_install() {
done < <( grep "$installfiles" hier.c | cut -d'"' --output-delimiter ' ' -f 2,4 ) done < <( grep "$installfiles" hier.c | cut -d'"' --output-delimiter ' ' -f 2,4 )
# install leapsecs.dat # install leapsecs.dat
mkdir -p $root/var/state/clockspeed # mkdir -p $root/var/state/clockspeed
cp leapsecs.dat $root/var/state/clockspeed/ cp leapsecs.dat $root$sysconfdir
# install clockctl # install clockctl
rock_substitute "$confdir/clockctl.sh" > "$root$bindir/clockctl" rock_substitute "$confdir/clockctl.sh" > "$root$bindir/clockctl"

Loading…
Cancel
Save