Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added mapper for network configuration
Will decide between OctoPi and Raspbian type of network configuration depending on whether the user set up a network configuration in /boot/octopi-network.txt or not. A mapping script will try to see if it can find an uncommented line iface $IFACE-octopi in /boot/octopi-network.txt. If so, the user obviously used this method to setup their network credentials (the lines are usually all commented out) and $IFACE will be mapped to use the $IFACE-octopi definition from that file. If no such line is found, $IFACE will be mapped to $IFACE-raspbian, which is the default wlan0/wlan1 configuration shipped with vanilla Raspbian. See also #122
- Loading branch information
Showing
4 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
IFACE=$1 | ||
|
||
if grep -q "^\s*iface $IFACE-octopi " /boot/octopi-network.txt | ||
then | ||
echo "$IFACE-octopi" | ||
echo "Using /boot/octopi-network.txt for configuring $IFACE..." >> /var/log/map_iface.log | ||
else | ||
echo "$IFACE-raspbian" | ||
echo "Using original Raspbian configuration for configuring $IFACE..." >> /var/log/map_iface.log | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/var/log/map_iface.log | ||
{ | ||
rotate 1 | ||
daily | ||
missingok | ||
notifempty | ||
compress | ||
delaycompress | ||
sharedscripts | ||
} |