8000 make Hostname configureable by Swiftb0y · Pull Request #100 · RoganDawes/P4wnP1 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

make Hostname configureable #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions boot/boot_P4wnP1
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ fi

# change hostname to make P4wnP1 resolveable on "name.local"
if $WIFI || $USB_ETHERNET; then
hostname="MAME82-P4WNP1"

hostname $hostname
echo $hostname > /etc/hostname
if [[ -z $HOSTNAME ]];then
$HOSTNAME="MAME82-P4WNP1"
fi
hostname $HOSTNAME
echo $HOSTNAME > /etc/hostname

# add to /etc/hosts
if ! grep -q -E "^127\.0\.0\.1 $hostname\$" /etc/hosts; then
echo "127.0.0.1 $hostname" >> /etc/hosts
if ! grep -q -E "^127\.0\.0\.1 $HOSTNAME\$" /etc/hosts; then
echo "127.0.0.1 $HOSTNAME" >> /etc/hosts
fi
fi

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ USE_UMS=false # if true USB Mass Storage will be enabled
# Network and DHCP options USB over Ethernet
# ===========================================

$HOSTNAME="MAME82-P4WNP1"

# We choose an IP with a very small subnet (see comments in README.rst)
IF_IP="172.16.0.1" # IP used by P4wnP1
IF_MASK="255.255.255.252"
Expand Down
0