Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image
Commits
1bb3e009
Commit
1bb3e009
authored
Sep 29, 2011
by
Nikos Skalkotos
Browse files
Export all SNF_IMAGE_* vars in a static way.
parent
b6275d20
Changes
1
Hide whitespace changes
Inline
Side-by-side
helper/rc.local
View file @
1bb3e009
...
...
@@ -56,19 +56,21 @@ fi
target
=
$(
mktemp
-d
--tmpdir
target.XXXXXXXX
)
||
exit
1
CLEANUP+
=(
"rmdir
$target
"
)
SNF_IMAGE_DEV
=
/dev/sdb
SNF_IMAGE_TARGET
=
$target
export
SNF_IMAGE_DEV
=
/dev/sdb
export
SNF_IMAGE_TARGET
=
$target
# Make sure all SNF_IMAGE_* variables are accessible by snf-image/tasks scripts
set
| egrep ^SNF_IMAGE_
\\
w+
=
|
cut
-d
=
-f1
|
while
read
line
;
do
export
$line
done
if
[
!
-d
"/usr/lib/snf-image/tasks"
]
;
then
log_error
"snf-image/tasks directory is missing"
fi
RUN_PARTS
=
`
which run-parts
`
if
[
-
n
"
$RUN_PARTS
"
-a
-n
"/usr/lib/snf-image/tasks"
]
;
then
$RUN_PARTS
"/usr/lib/snf-image/tasks
"
RUN_PARTS
=
$(
which run-parts
)
if
[
-
z
"
$RUN_PARTS
"
]
;
then
log_error
"run-parts programe is missing from the system
"
fi
echo
"Execute all snf-image tasks...."
$RUN_PARTS
-v
--exit-on-error
"/usr/lib/snf-image/tasks"
cleanup
trap
- EXIT
...
...
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