Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
initramfs-with-mca
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
initramfs-with-mca
Commits
5ad41b18
Commit
5ad41b18
authored
Feb 23, 2023
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
installation: Create get-network.sh from host information.
parent
1c959167
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
0 deletions
+22
-0
installation/20generate-get-network.sh
installation/20generate-get-network.sh
+15
-0
installation/30install-image.sh
installation/30install-image.sh
+0
-0
installation/get-network.sh.in
installation/get-network.sh.in
+7
-0
No files found.
installation/20generate-get-network.sh
0 → 100755
View file @
5ad41b18
#!/bin/bash
# Generate /etc/opt/slapos/get-network.sh
# from "$GIT_ROOT"/installation/get-network.sh.in
# using "$GIT_ROOT"/installation/display-host-information.sh
set
-e
# get the root of the git repository (requires git to be installed)
GIT_ROOT
=
$(
git rev-parse
--show-toplevel
)
cd
"
$GIT_ROOT
"
source
"
$GIT_ROOT
"
/installation/display-host-information.sh
sed
"s|%DEFAULT_NETMASK%|
$DEFAULT_NETMASK
|g;s|%DEFAULT_NETMASK_NUMBER%|
$DEFAULT_NETMASK_NUMBER
|g;s|%DEFAULT_INTERFACE%|
$DEFAULT_INTERFACE
|g;s|%DEFAULT_ROUTER%|
$DEFAULT_ROUTER
|g;s|%DEFAULT_IP%|
$DEFAULT_IP
|g"
"
$GIT_ROOT
"
/installation/get-network.sh.in
>
/etc/opt/slapos/get-network.sh
installation/
2
0install-image.sh
→
installation/
3
0install-image.sh
View file @
5ad41b18
File moved
installation/get-network.sh.in
0 → 100644
View file @
5ad41b18
echo -e "nameserver 1.1.1.1\nnameserver 8.8.8.8" > /etc/resolv.conf
ip a del dev %DEFAULT_INTERFACE% 10.42.42.42/32
ip a add dev %DEFAULT_INTERFACE% %DEFAULT_IP%/%DEFAULT_NETMASK_NUMBER%
ip r del default via 10.42.42.42 dev eno1
ip l set %DEFAULT_INTERFACE% up
ip r add default via %DEFAULT_ROUTER% dev %DEFAULT_INTERFACE% onlink
ip r add %DEFAULT_NETMASK% dev %DEFAULT_INTERFACE% proto kernel scope link src %DEFAULT_IP%
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