File: explicitly-use-bin-bash-for-tuned-scripts.patch

package info (click to toggle)
tuned 2.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,092 kB
  • sloc: python: 11,886; sh: 680; ansic: 178; makefile: 178
file content (127 lines) | stat: -rw-r--r-- 3,805 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
From 66d7161bdcf9585301fec40a10a2f44efc9ae85e Mon Sep 17 00:00:00 2001
From: Evgeni Golov <evgeni@debian.org>
Date: Sun, 13 Dec 2020 12:28:39 +0100
Subject: [PATCH] explicitly use /bin/bash for tuned scripts

---
 experiments/powertop2tuned.py                  | 2 +-
 profiles/cpu-partitioning/00-tuned-pre-udev.sh | 2 +-
 profiles/cpu-partitioning/script.sh            | 2 +-
 profiles/functions                             | 2 +-
 profiles/laptop-ac-powersave/script.sh         | 2 +-
 profiles/powersave/script.sh                   | 2 +-
 profiles/realtime-virtual-guest/script.sh      | 2 +-
 profiles/realtime-virtual-host/script.sh       | 2 +-
 profiles/realtime/script.sh                    | 2 +-
 profiles/spindown-disk/script.sh               | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/experiments/powertop2tuned.py b/experiments/powertop2tuned.py
index 211df2d..0726bcb 100755
--- a/experiments/powertop2tuned.py
+++ b/experiments/powertop2tuned.py
@@ -41,7 +41,7 @@ except ImportError:
 	from htmlentitydefs import name2codepoint
 
 
-SCRIPT_SH = """#!/bin/sh
+SCRIPT_SH = """#!/bin/bash
 
 . /usr/lib/tuned/functions
 
diff --git a/profiles/cpu-partitioning/00-tuned-pre-udev.sh b/profiles/cpu-partitioning/00-tuned-pre-udev.sh
index 7bfd7e0..e4319b2 100755
--- a/profiles/cpu-partitioning/00-tuned-pre-udev.sh
+++ b/profiles/cpu-partitioning/00-tuned-pre-udev.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 type getargs >/dev/null 2>&1 || . /lib/dracut-lib.sh
 
diff --git a/profiles/cpu-partitioning/script.sh b/profiles/cpu-partitioning/script.sh
index 8677050..cb378b7 100755
--- a/profiles/cpu-partitioning/script.sh
+++ b/profiles/cpu-partitioning/script.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . /usr/lib/tuned/functions
 
diff --git a/profiles/functions b/profiles/functions
index 0e1836b..ff36630 100644
--- a/profiles/functions
+++ b/profiles/functions
@@ -205,7 +205,7 @@ set_disk_scheduler_quantum() {
 
 restore_disk_scheduler_quantum() {
 	if [ -r "$DISK_QUANTUM_SAVE" ]; then
-		/bin/sh "$DISK_QUANTUM_SAVE" &>/dev/null
+		/bin/bash "$DISK_QUANTUM_SAVE" &>/dev/null
 		rm -f "$DISK_QUANTUM_SAVE"
 	fi
 }
diff --git a/profiles/laptop-ac-powersave/script.sh b/profiles/laptop-ac-powersave/script.sh
index 3b73626..580082e 100755
--- a/profiles/laptop-ac-powersave/script.sh
+++ b/profiles/laptop-ac-powersave/script.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . /usr/lib/tuned/functions
 
diff --git a/profiles/powersave/script.sh b/profiles/powersave/script.sh
index b0d329d..c73f4ef 100755
--- a/profiles/powersave/script.sh
+++ b/profiles/powersave/script.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . /usr/lib/tuned/functions
 
diff --git a/profiles/realtime-virtual-guest/script.sh b/profiles/realtime-virtual-guest/script.sh
index ce94a4b..08efd4d 100755
--- a/profiles/realtime-virtual-guest/script.sh
+++ b/profiles/realtime-virtual-guest/script.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . /usr/lib/tuned/functions
 
diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh
index edae6c5..597bb66 100755
--- a/profiles/realtime-virtual-host/script.sh
+++ b/profiles/realtime-virtual-host/script.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . /usr/lib/tuned/functions
 
diff --git a/profiles/realtime/script.sh b/profiles/realtime/script.sh
index 4151731..ada5a93 100755
--- a/profiles/realtime/script.sh
+++ b/profiles/realtime/script.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . /usr/lib/tuned/functions
 
diff --git a/profiles/spindown-disk/script.sh b/profiles/spindown-disk/script.sh
index 5ee40dd..a534697 100755
--- a/profiles/spindown-disk/script.sh
+++ b/profiles/spindown-disk/script.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 . /usr/lib/tuned/functions
 
-- 
2.29.2