diff options
author | Petr Štetiar <ynezz@true.cz> | 2010-10-03 04:54:19 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2010-10-06 15:23:08 -0700 |
commit | 4085252bf8ca739b853f3702fd2396f756c1e42a (patch) | |
tree | bb7f429aef4dbcc5093744cdc264a8dbac2069e9 /recipes/initscripts | |
parent | 1ada6eaf91f1c28bb9cac7822d83ea079c71ede0 (diff) | |
download | openembedded-4085252bf8ca739b853f3702fd2396f756c1e42a.tar.gz |
init-scripts: fix save-rtc error with date formatting on uclibc
uClibc's date does support only SUSv3 strptime[1], so the date command in
save-rtc.sh fails with 'date: invalid date '%2m%2d%2H%2M2010'.
1. http://www.opengroup.org/onlinepubs/009695399/functions/strptime.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/initscripts')
-rw-r--r-- | recipes/initscripts/files/save-rtc-uclibc.sh | 5 | ||||
-rw-r--r-- | recipes/initscripts/initscripts_1.0.bb | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/recipes/initscripts/files/save-rtc-uclibc.sh b/recipes/initscripts/files/save-rtc-uclibc.sh new file mode 100644 index 0000000000..8f4e587aba --- /dev/null +++ b/recipes/initscripts/files/save-rtc-uclibc.sh @@ -0,0 +1,5 @@ +#! /bin/sh +/etc/init.d/hwclock.sh stop + +# Update the timestamp +date +%m%d%H%M%Y > /etc/timestamp diff --git a/recipes/initscripts/initscripts_1.0.bb b/recipes/initscripts/initscripts_1.0.bb index 8c38d7fc9b..cc606242cc 100644 --- a/recipes/initscripts/initscripts_1.0.bb +++ b/recipes/initscripts/initscripts_1.0.bb @@ -4,7 +4,7 @@ PRIORITY = "required" DEPENDS = "makedevs" RDEPENDS_${PN} = "makedevs" LICENSE = "GPL" -PR = "r123" +PR = "r124" SRC_URI = "file://functions \ file://halt \ @@ -31,7 +31,8 @@ SRC_URI = "file://functions \ file://device_table.txt \ file://populate-volatile.sh \ file://volatiles \ - file://save-rtc.sh" + file://save-rtc.sh \ + file://save-rtc-uclibc.sh" SRC_URI_append_arm = " file://alignment.sh" @@ -137,3 +138,12 @@ do_install_append_angstrom () { do_install_append_hipox () { ln -sf ../init.d/sysfs.sh ${D}${sysconfdir}/rc6.d/S80sysfs } + +# uclibc's date does support only SUSv3 strptime() +do_install_append_linux-uclibc() { + install -m 0755 ${WORKDIR}/save-rtc-uclibc.sh ${D}${sysconfdir}/init.d/save-rtc.sh +} + +do_install_append_linux-uclibceabi() { + install -m 0755 ${WORKDIR}/save-rtc-uclibc.sh ${D}${sysconfdir}/init.d/save-rtc.sh +} |