diff options
author | Wang Mingyu <wangmy@fujitsu.com> | 2023-10-24 07:47:39 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-10-23 17:00:49 -0700 |
commit | 8c749f1cd42ae250b059db5174933f4ed736b758 (patch) | |
tree | 4bc284e17a3aa2d24419df7daaa88266ed6f6077 /meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server | |
parent | 21db09270d8c05ea1871277dd9899e352915297a (diff) | |
download | meta-openembedded-8c749f1cd42ae250b059db5174933f4ed736b758.tar.gz |
redis: upgrade 7.2.1 -> 7.2.2
Changelog:
============
* (CVE-2023-45145) The wrong order of listen(2) and chmod(2) calls creates a
race condition that can be used by another process to bypass desired Unix
socket permissions on startup.
* Fix compilation error on MacOS 13 (#12611)
* WAITAOF could timeout in the absence of write traffic in case a new AOF is
created and an AOF rewrite can't immediately start (#12620)
* Fix crash when running rebalance command in a mixed cluster of 7.0 and 7.2
nodes (#12604)
* Fix the return type of the slot number in cluster shards to integer, which
makes it consistent with past behavior (#12561)
* Fix CLUSTER commands are called from modules or scripts to return TLS info
appropriately (#12569)
* redis-cli, fix crash on reconnect when in SUBSCRIBE mode (#12571)
* Fix overflow calculation for next timer event (#12474)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server')
-rwxr-xr-x | meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server b/meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server new file mode 100755 index 000000000..c5f335f57 --- /dev/null +++ b/meta-oe/recipes-extended/redis/redis-7.2.2/init-redis-server | |||
@@ -0,0 +1,71 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | ### BEGIN INIT INFO | ||
4 | # Provides: redis-server | ||
5 | # Required-Start: $network | ||
6 | # Required-Stop: $network | ||
7 | # Default-Start: S 2 3 4 5 | ||
8 | # Default-Stop: 0 1 6 | ||
9 | # Short-Description: Redis, a key-value store | ||
10 | # Description: Redis is an open source, advanced key-value store. | ||
11 | # http://redis.io | ||
12 | ### END INIT INFO | ||
13 | |||
14 | test -f /usr/bin/redis-server || exit 0 | ||
15 | |||
16 | ARGS="/etc/redis/redis.conf" | ||
17 | |||
18 | case "$1" in | ||
19 | start) | ||
20 | echo "Starting redis-server..." | ||
21 | start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS | ||
22 | ;; | ||
23 | stop) | ||
24 | echo "Stopping redis-server..." | ||
25 | start-stop-daemon --stop --quiet --exec /usr/bin/redis-server | ||
26 | ;; | ||
27 | restart) | ||
28 | echo "Stopping redis-server..." | ||
29 | start-stop-daemon --stop --quiet --exec /usr/bin/redis-server | ||
30 | |||
31 | # Since busybox implementation ignores --retry arguments repeatedly check | ||
32 | # if the process is still running and try another signal after a timeout, | ||
33 | # efectively simulating a stop with --retry=TERM/5/KILL/5 schedule. | ||
34 | waitAfterTerm=5000000 # us / 5000 ms / 5 s | ||
35 | waitAfterKill=5000000 # us / 5000 ms / 5 s | ||
36 | waitStep=100000 # us / 100 ms / 0.1 s | ||
37 | waited=0 | ||
38 | start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server | ||
39 | processOff=$? | ||
40 | while [ $processOff -eq 0 ] && [ $waited -le $waitAfterTerm ] ; do | ||
41 | usleep ${waitStep} | ||
42 | ((waited+=${waitStep})) | ||
43 | start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server | ||
44 | processOff=$? | ||
45 | done | ||
46 | if [ $processOff -eq 0 ] ; then | ||
47 | start-stop-daemon --stop --signal KILL --exec /usr/bin/redis-server | ||
48 | start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server | ||
49 | processOff=$? | ||
50 | fi | ||
51 | waited=0 | ||
52 | while [ $processOff -eq 0 ] && [ $waited -le $waitAfterKill ] ; do | ||
53 | usleep ${waitStep} | ||
54 | ((waited+=${waitStep})) | ||
55 | start-stop-daemon --stop --test --quiet --exec /usr/bin/redis-server | ||
56 | processOff=$? | ||
57 | done | ||
58 | # Here $processOff will indicate if waiting and retrying according to | ||
59 | # the schedule ended in a successfull stop or not. | ||
60 | |||
61 | echo "Starting redis-server..." | ||
62 | start-stop-daemon --start --quiet --exec /usr/bin/redis-server -- $ARGS | ||
63 | ;; | ||
64 | *) | ||
65 | echo "Usage: /etc/init.d/redis-server {start|stop|restart}" | ||
66 | exit 1 | ||
67 | ;; | ||
68 | esac | ||
69 | |||
70 | exit 0 | ||
71 | |||