Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
darkbit
ffbs-gluon
Commits
24fd45d4
Commit
24fd45d4
authored
11 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-config-mode: remove bind mounts
parent
601fd3f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-config-mode/files/etc/init.d/gluon-config-mode
+37
-27
37 additions, 27 deletions
package/gluon-config-mode/files/etc/init.d/gluon-config-mode
with
37 additions
and
27 deletions
package/gluon-config-mode/files/etc/init.d/gluon-config-mode
+
37
−
27
View file @
24fd45d4
...
...
@@ -3,11 +3,10 @@
START
=
12
config_mode_addr
=
192.168.1.1
config_mode_netmask
=
255.255.255.0
CONFIG_MODE_ADDR
=
192.168.1.1
CONFIG_MODE_NETMASK
=
255.255.255.0
config_mode_dnsname
=
freifunk
config_mode_dhcp_range
=
192.168.1.2,192.168.1.254
CONFIG_MODE_DHCP_RANGE
=
192.168.1.2,192.168.1.254
delete_interface
()
{
...
...
@@ -24,6 +23,38 @@ check_enable() {
fi
}
setup_network
()
{
export
UCI_CONFIG_DIR
=
/var/gluon/config-mode/config
mkdir
-p
"
$UCI_CONFIG_DIR
"
cp
/etc/config/network
"
$UCI_CONFIG_DIR
"
config_load network
config_foreach delete_interface interface
uci_add network interface config
uci_set network config ifname
"
$(
sysconfig lan_ifname
||
sysconfig wan_ifname
)
"
uci_set network config
type
'bridge'
uci_set network config proto
'static'
uci_set network config ipaddr
"
$CONFIG_MODE_ADDR
"
uci_set network config netmask
"
$CONFIG_MODE_NETMASK
"
uci_commit network
SERVICE_DAEMONIZE
=
1
SERVICE_WRITE_PID
=
1
service_start /sbin/netifd
-c
"
$UCI_CONFIG_DIR
"
setup_switch
()
{
return
0
;
}
include /lib/network
setup_switch
sleep
5
}
start
()
{
.
/lib/gluon/functions/sysconfig.sh
...
...
@@ -36,27 +67,7 @@ start() {
uci
set
'gluon-config-mode.@wizard[0].enabled=0'
uci commit gluon-config-mode
mkdir
-p
/var/gluon/config-mode/config
mount
-o
bind
/etc/config /var/gluon/config-mode/config
touch
/var/gluon/config-mode/wireless
mount
-o
bind
/var/gluon/config-mode/wireless /etc/config/wireless
cp
/etc/config/network /var/gluon/config-mode
mount
-o
bind
/var/gluon/config-mode/network /etc/config/network
config_load network
config_foreach delete_interface interface
uci_add network interface config
uci_set network config ifname
"
$(
sysconfig lan_ifname
||
sysconfig wan_ifname
)
"
uci_set network config
type
'bridge'
uci_set network config proto
'static'
uci_set network config ipaddr
"
$config_mode_addr
"
uci_set network config netmask
"
$config_mode_netmask
"
uci_commit network
/etc/init.d/network start
setup_network
/usr/sbin/telnetd
-l
/lib/gluon/config-mode/ash-login
/etc/init.d/dropbear start
...
...
@@ -68,8 +79,7 @@ start() {
# correctly finish firstboot
/etc/init.d/done boot
echo
"
$config_mode_addr
$config_mode_dnsname
"
>
/var/gluon/config-mode/hosts
dnsmasq
-h
-H
/var/gluon/config-mode/hosts
-R
-F
interface:br-config,
$config_mode_dhcp_range
-l
/tmp/dhcp.leases
-O
option:router
dnsmasq
-h
-R
-F
interface:br-config,
$CONFIG_MODE_DHCP_RANGE
-l
/tmp/dhcp.leases
-O
option:router
.
/etc/diag.sh
get_status_led
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment