Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
9dd2d834
Commit
9dd2d834
authored
Dec 17, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
boot scripts: check the downloaded dot-config before using it
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
89b04c5b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
wrs_build_wraprootfs
build/scripts/wrs_build_wraprootfs
+1
-0
S20dot-config
userspace/rootfs_override/etc/init.d/S20dot-config
+5
-3
No files found.
build/scripts/wrs_build_wraprootfs
View file @
9dd2d834
...
...
@@ -34,6 +34,7 @@ cat > $TMPSCRIPT << EOF
.
$WRS_BASE_DIR
/../.config
mkdir -p
$TMPFS
/wr/etc
cp
$WRS_BASE_DIR
/../.config
$TMPFS
/wr/etc/dot-config
cp
$WRS_BASE_DIR
/../Kconfig
$TMPFS
/wr/etc/Kconfig
cp -r
$rootfs_vanilla
/*
$TMPFS
cp -r
$WRS_OUTPUT_DIR
/images/wr/*
$TMPFS
/wr
...
...
userspace/rootfs_override/etc/init.d/S20dot-config
View file @
9dd2d834
...
...
@@ -45,12 +45,14 @@ if [ -n "$CONFIG_DOTCONF_URL" ]; then
echo
"Invalid URL for dot-config:
\"
$URL
\"
"
>
& 2
;;
esac
# If it exists
and it is not empty or awfully small, trust it
# If it exists
, it is not empty or too small, and the checker is happy..
if
[
-f
$tmpconfig
]
&&
[
$(
cat
$tmpconfig
|
wc
-c
)
-gt
200
]
;
then
[
$(
cat
$tmpconfig
|
wc
-c
)
-gt
200
]
&&
/wr/bin/wrs_checkcfg
$tmpconfig
/wr/etc/Kconfig
;
then
# copy it in place to use the new file (unless it is identical)
cmp
-s
$tmpconfig
$dotconfig
||
cp
$tmpconfig
$dotconfig
fi
fi
# Finally, apply what we have, be it old or new
.
/wr/bin/apply_dot-config
/wr/bin/apply_dot-config
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment