Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LARN
RNA
Software
Commits
8c4fbf96
Commit
8c4fbf96
authored
Jul 20, 2018
by
Andreas Schmidt
Browse files
Add a setup.sh script to simplify first-time setup.
parent
8af70749
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
build.sh
View file @
8c4fbf96
...
...
@@ -24,6 +24,7 @@ echo 'nameserver 9.9.9.9' >> $DIR/etc/resolv.conf
cp
$(
which qemu-arm-static
)
$DIR
/usr/bin
cp
provision.sh
$DIR
/root
cp
setup.sh
$DIR
/root
chroot
$DIR
qemu-arm-static /bin/bash /root/provision.sh
rm
$DIR
/root/provision.sh
...
...
setup.sh
0 → 100644
View file @
8c4fbf96
if
[
$#
-lt
1
]
;
then
echo
1>&2
"
$0
: not enough arguments"
exit
2
elif
[
$#
-gt
1
]
;
then
echo
1>&2
"
$0
: too many arguments"
exit
2
fi
RNA_NAME
=
$1
apt update
&&
apt upgrade
-y
&&
apt autoremove
-y
apt
install
-y
\
salt-minion
echo
"
$RNA_NAME
"
>
/etc/salt/minion_id
echo
"master: 10.8.0.1"
>
/etc/salt/minion.d/master.conf
service salt-minion restart
sed
-i
-e
"s/odroid/
$RNA_NAME
/g"
/etc/hostname
sed
-i
-e
"s/odroid/
$RNA_NAME
/g"
/etc/hosts
salt-call test.ping
echo
"Press any key to continue."
read
-n
1
-s
salt-call test.ping
salt-call state.highstate
salt-call state.sls tools
Write
Preview
Supports
Markdown
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