From e96dc90ba443601116eed52873da2ea929af726e Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Mon, 21 Jun 2010 17:28:57 +0800 Subject: populate-volatile.sh: add "clearcache" cmdline option Sometimes /etc/volatiles.cache is corrupted when Qemu gets crashed. Current logic is to always execute cache file as long as it exists. When it's currupted, this causes core volatile files/directories not created and then prevent many important services from starting. Automatic check on cache goodness is one option. However it's not easy since the currupted file could be various states. In one form, it's full of zeros. In another form, some commands are truncated. Here allow a cmdline option to force removing volatiles.cache file, since it's easy for user to check whether the cache file is mal-formed. Usually you'll observe typical directories like "/var/log/" or "/var/run" not found error. Signed-off-by Kevin Tian --- .../initscripts/initscripts-1.0/populate-volatile.sh | 15 ++++++++++++++- meta/packages/initscripts/initscripts_1.0.bb | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'meta') diff --git a/meta/packages/initscripts/initscripts-1.0/populate-volatile.sh b/meta/packages/initscripts/initscripts-1.0/populate-volatile.sh index 8742dbfc6b..1813fd1240 100755 --- a/meta/packages/initscripts/initscripts-1.0/populate-volatile.sh +++ b/meta/packages/initscripts/initscripts-1.0/populate-volatile.sh @@ -168,7 +168,20 @@ apply_cfgfile() { } -if test -e /etc/volatile.cache -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" +clearcache=0 +exec 9&- + +if test -e /etc/volatile.cache -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" -a "x$clearcache" = "x0" then sh /etc/volatile.cache else diff --git a/meta/packages/initscripts/initscripts_1.0.bb b/meta/packages/initscripts/initscripts_1.0.bb index 20503e1c6a..0d79b53a8c 100644 --- a/meta/packages/initscripts/initscripts_1.0.bb +++ b/meta/packages/initscripts/initscripts_1.0.bb @@ -4,7 +4,7 @@ PRIORITY = "required" DEPENDS = "makedevs" RDEPENDS = "makedevs" LICENSE = "GPLv2" -PR = "r121" +PR = "r122" SRC_URI = "file://functions \ file://halt \ -- cgit v1.2.3-54-g00ecf From e0a1238b227e3e846c220f218c614c52300b3f7a Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Fri, 2 Jul 2010 17:28:00 +0800 Subject: siteinfo.bbclass: remove duplicated 'common' appendent 'common' site file is already appended in get_siteinfo_list. No need for another duplication later Signed-off-by: Kevin Tian --- meta/classes/siteinfo.bbclass | 1 - 1 file changed, 1 deletion(-) (limited to 'meta') diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass index 8b7d3dfcf6..506a7aa1d2 100644 --- a/meta/classes/siteinfo.bbclass +++ b/meta/classes/siteinfo.bbclass @@ -76,7 +76,6 @@ def siteinfo_get_files(d): # Determine which site files to look for sites = get_siteinfo_list(d) - sites.append("common"); # Check along bbpath for site files and append in reverse order so # the application specific sites files are last and system site -- cgit v1.2.3-54-g00ecf