diff options
author | Richard Purdie <richard@openedhand.com> | 2006-12-19 19:24:24 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-12-19 19:24:24 +0000 |
commit | a8b7d094ed0686b0f6737861e0d82224acedfacc (patch) | |
tree | 2f42907c9349b3a79719f15a0d56aa4cdfa1b47a /meta/packages/prelink/prelink-20061027/prelink.cron.daily | |
parent | 01303ccecf5e0cc24fdd1a67071d1cfd9ead545e (diff) | |
download | poky-a8b7d094ed0686b0f6737861e0d82224acedfacc.tar.gz |
Add elfutils, prelink
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1049 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/prelink/prelink-20061027/prelink.cron.daily')
-rw-r--r-- | meta/packages/prelink/prelink-20061027/prelink.cron.daily | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/packages/prelink/prelink-20061027/prelink.cron.daily b/meta/packages/prelink/prelink-20061027/prelink.cron.daily new file mode 100644 index 0000000000..0b3c07322c --- /dev/null +++ b/meta/packages/prelink/prelink-20061027/prelink.cron.daily | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | . /etc/default/prelink | ||
4 | |||
5 | renice +19 -p $$ >/dev/null 2>&1 | ||
6 | |||
7 | if [ "$PRELINKING" != yes ]; then | ||
8 | if [ -f /etc/prelink.cache ]; then | ||
9 | echo /usr/sbin/prelink -uav > /var/log/prelink.log | ||
10 | /usr/sbin/prelink -uav >> /var/log/prelink.log 2>&1 | ||
11 | rm -f /etc/prelink.cache | ||
12 | # Restart init if needed | ||
13 | [ -n "$(find `ldd /sbin/init | awk '{ print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u | ||
14 | fi | ||
15 | exit 0 | ||
16 | fi | ||
17 | |||
18 | if [ ! -f /etc/prelink.cache -o -f /var/lib/misc/prelink.force ] \ | ||
19 | || grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then | ||
20 | # If cache does not exist or is from older prelink versions or | ||
21 | # if we were asked to explicitely, force full prelinking | ||
22 | rm -f /etc/prelink.cache /var/lib/misc/prelink.force | ||
23 | PRELINK_OPTS="$PRELINK_OPTS -f" | ||
24 | date > /var/lib/misc/prelink.full | ||
25 | elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \ | ||
26 | -a "`find /var/lib/misc/prelink.full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \ | ||
27 | = /var/lib/misc/prelink.full ]; then | ||
28 | # If prelink without -q has been run in the last | ||
29 | # PRELINK_FULL_TIME_INTERVAL days, just use quick mode | ||
30 | PRELINK_OPTS="$PRELINK_OPTS -q" | ||
31 | else | ||
32 | date > /var/lib/misc/prelink.full | ||
33 | fi | ||
34 | |||
35 | echo /usr/sbin/prelink -av $PRELINK_OPTS > /var/log/prelink.log | ||
36 | /usr/sbin/prelink -av $PRELINK_OPTS >> /var/log/prelink.log 2>&1 | ||
37 | # Restart init if needed | ||
38 | [ -n "$(find `ldd /sbin/init | awk '{ print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u | ||
39 | |||
40 | exit 0 | ||