Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RapidSpace Autoinstall OS
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
Xiaowu Zhang
RapidSpace Autoinstall OS
Commits
bebb5aab
Commit
bebb5aab
authored
May 27, 2020
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: hsinchu
parent
662413f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
5 deletions
+92
-5
dnsmasq
dnsmasq
+6
-5
gen_hsinchu.sh
gen_hsinchu.sh
+86
-0
No files found.
dnsmasq
View file @
bebb5aab
#!/bin/sh
#UPDATE THOSE VARIABLES DEPENDING ON YOUR SITE
MY_IF_NAME
=
ens9f1
MY_IP_ADDR
=
10.0.45.
5
1
DHCP_RANGE
=
10.0.45.100,
10.0.45.200
,255.255.255.0
MY_IF_NAME
=
VLAN100
MY_IP_ADDR
=
10.0.45.1
DHCP_RANGE
=
10.0.45.100,
static
,255.255.255.0
ROUTER_ADDR
=
10.0.45.1
DNS_SERVER
=
1.2.4.8
LOCAL_SCRIPT
=
$(
realpath
`
dirname
"
$0
"
`
)
/gen_
xinzho
u.sh
LOCAL_SCRIPT
=
$(
realpath
`
dirname
"
$0
"
`
)
/gen_
hsinch
u.sh
if
[
!
-f
version.info
]
then
...
...
@@ -34,4 +34,5 @@ exec dnsmasq -d --port=0 --log-dhcp \
--dhcp-option
=
option:dns-server,
$DNS_SERVER
\
--dhcp-boot
=
debian-installer/amd64/grubx64.efi
\
--enable-tftp
--tftp-root
=
$(
realpath
`
dirname
"
$0
"
`
)
\
--conf-file
=
/dev/null
--conf-file
=
/dev/null
\
--dhcp-host
=
98:03:9b:9b:8a:47,10.0.45.101,1h
gen_hsinchu.sh
0 → 100755
View file @
bebb5aab
#!/bin/sh
set
-e
common
=
console
=
ttyS1,57600
mac
=
'
98:03:9b:9b:8a:46
b8:59:9f:37:9a:bc
b8:59:9f:37:9a:c4
b8:59:9f:37:9a:9c
b8:59:9f:36:2b:e2
b8:59:9f:37:9f:cc
b8:59:9f:37:9f:9c
b8:59:9f:37:9b:8c
b8:59:9f:35:68:06
b8:59:9f:35:5f:66
98:03:9b:9a:e5:8a
b8:59:9f:37:9a:a4
b8:59:9f:37:9a:b4
98:03:9b:9c:22:88
'
i
=
2
hostname_prefix
=
hsinchu-tiogapass-
(
#echo set timeout=0
echo
if
false
echo
then
true
for
mac
in
$mac
;
do
echo
"elif [
\$
net_default_mac =
$mac
]"
echo
then
set
i
=
`
printf
%03u
$i
`
i
=
`
expr
$i
+ 1
`
done
cat
<<
EOF
else unset timeout
fi
menuentry 'Install Debian' {
linux /debian-installer/amd64/linux vga=788 url=tftp://
\$
pxe_default_server/preseed.cfg language=C country=CN keymap=us hostname=
${
hostname_prefix
}
\$
i domain= --- mitigations=off
$common
initrd /debian-installer/amd64/initrd.gz
}
menuentry 'SystemRescueCd' {
linux /sysresccd/sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archiso_http_srv=http://
\$
pxe_default_server:69/sysresccd/ checksum ip=dhcp
$common
initrd /sysresccd/sysresccd/boot/intel_ucode.img /sysresccd/sysresccd/boot/amd_ucode.img /sysresccd/sysresccd/boot/x86_64/sysresccd.img
}
menuentry 'Exit' {
exit
}
EOF
)
>
debian-installer/amd64/grub/grub.cfg
for
mac
in
$mac
do
hostname
=
${
hostname_prefix
}
$(
printf
%03u
$i
)
mkdir
-p
$hostname
cat
>
$hostname
/interfaces
<<
EOF
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eno1
#iface eno1 inet dhcp
iface eno1 inet static
address 192.168.46.
$((
50
+
$i
))
/24
allow-hotplug ens9f1
iface ens9f1 inet static
address 10.0.45.
$((
50
+
$i
))
/24
gateway 10.0.45.1
dns-nameservers 1.2.4.8 223.5.5.5 223.6.6.6
#allow-hotplug ens9f0
##iface ens9f0 inet dhcp
#iface ens9f0 inet static
# address 113.24.192.26/30
# gateway 113.24.192.25
EOF
i
=
`
expr
$i
+ 1
`
done
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