summaryrefslogtreecommitdiff
path: root/main/mkinitfs/0001-init-dont-use-local-in-global-scope.patch
blob: 3cb4f7c03d04c452a64d893e507eee91523d0429 (plain)
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
From 46de24c44c1b1c3a5fe92e5c4d28c650798bd8d7 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 4 Aug 2016 13:24:46 +0200
Subject: [PATCH] init: dont use local in global scope

---
 initramfs-init.in | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/initramfs-init.in b/initramfs-init.in
index 639826c..6b03fbb 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -479,12 +479,11 @@ fi
 
 if [ "$KOPT_splash" != "no" ]; then
 	echo "IMAGE_ALIGN=CM" > /tmp/fbsplash.cfg
-	local fbdev img
 	for fbdev in /dev/fb[0-9]; do
 		[ -e "$fbdev" ] || break
-		local num="${fbdev#/dev/fb}"
+		num="${fbdev#/dev/fb}"
 		for img in /media/*/fbsplash$num.ppm; do
-			local config="${img%.*}.cfg"
+			config="${img%.*}.cfg"
 			[ -e "$config" ] || config=/tmp/fbsplash.cfg
 			fbsplash -s "$img" -d "$fbdev" -i "$config"
 			break
@@ -498,7 +497,7 @@ fi
 if [ -n "$fbsplash" ] && [ -e "$fbsplash" ]; then
 	ebegin "Starting bootsplash"
 	mkfifo $sysroot/$splashfile
-	local config="${fbsplash%.*}.cfg"
+	config="${fbsplash%.*}.cfg"
 	[ -e "$config" ] || config=/tmp/fbsplash.cfg
 	setsid fbsplash -T 16 -s "$fbsplash" -i $config -f $sysroot/$splashfile &
 	eend 0
-- 
2.9.1