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
nexedi
RapidSpace Autoinstall OS
Commits
826c0673
Commit
826c0673
authored
Feb 23, 2021
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dnsmasq_lille.sh
parent
7f78c954
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
0 deletions
+93
-0
dnsmasq_lille.sh
dnsmasq_lille.sh
+93
-0
No files found.
dnsmasq_lille.sh
0 → 100755
View file @
826c0673
#!/bin/sh
set
-e
SCRIPT_DIR
=
$(
realpath
`
dirname
"
$0
"
`
)
.
$SCRIPT_DIR
/download_boot_systems.sh
download_debian_10_if_needed
#download_sysrescuecd_if_needed
#UPDATE THOSE VARIABLES DEPENDING ON YOUR SITE
MY_IF_NAME
=
eth0
MY_IP_ADDR
=
192.168.46.2
DHCP_RANGE
=
192.168.46.100,static
ROUTER_ADDR
=
192.168.46.2
DNS_SERVER
=
8.8.8.8
common
=
console
=
ttyS1,57600
(
cat
<<
EOF
if [
\$
net_default_mac=7c:fe:90:43:80:a6 ];
then
set hostname=lille-edu-leopard-000
set interface=ens1
elif [
\$
net_default_mac=00:22:4d:d9:0a:aa ];
then
set hostname=lille-edu-tiogapass-001
set interface=ens9
elif [
\$
net_default_mac=00:22:4d:da:ca:87 ];
then
set hostname=lille-edu-capri-001
set interface=ens9
elif [
\$
net_default_mac=00:22:4d:da:ca:a7 ];
then
set hostname=lille-edu-capri-002
set inteface=ens9
fi
unset timeout
menuentry 'Debian Installer' {
linux /debian-installer/amd64/linux vga=788 url=tftp://
\$
pxe_default_server/preseed_lille.cfg language=C country=FR keymap=fr hostname=
\$
hostname domain= interface=
\$
interface --- 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
hostname
in
lille-edu-leopard-000 lille-edu-tiogapass-001 lille-edu-capri-001 lille-edu-capri-002
do
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
allow-hotplug ens9
iface ens9 inet dhcp
EOF
done
exec
dnsmasq
-d
--port
=
0
--log-dhcp
\
--interface
=
$MY_IF_NAME
\
--bind-interfaces
\
--except-interface
=
lo
\
--listen-address
=
$MY_IP_ADDR
\
--dhcp-range
=
$DHCP_RANGE
\
--dhcp-option
=
option:router,
$ROUTER_ADDR
\
--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
\
--dhcp-host
=
7c:fe:90:43:80:a8,192.168.46.100,1h
\
--dhcp-host
=
7c:fe:90:43:80:a6,192.168.46.102,1h
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