Permalink
Browse files

new init command "setup" for config changes

  • Loading branch information...
1 parent 72607fe commit 7661a5750a7b1340439c7f9a8d9701778518e500 @cr committed Jan 31, 2011
Showing with 13 additions and 8 deletions.
  1. +2 −3 src/control/postinst
  2. +10 −4 src/data/etc/init.d/piratebox
  3. +1 −1 src/data/etc/piratebox.common
View
@@ -14,9 +14,8 @@ then
echo "Next time you log in, you must use ssh."
fi
-# configure usb and network
-pb_usbconfig
-pb_netconfig
+# configure USB and network
+/etc/init.d/piratebox setup
# disable web interface, start PirateBox instead
/etc/init.d/uhttpd stop
@@ -3,16 +3,18 @@
NAME=piratebox
START=80
STOP=20
-EXTRA_COMMANDS="init update nodns"
-EXTRA_HELP=" init PirateBoxify a fresh USB disk
+EXTRA_COMMANDS="setup init update nodns"
+EXTRA_HELP=" setup Activate current USB and entwork configuration
+ init Mount USB, and PirateBoxify a fresh USB disk
update Update PirateBox files on USB disk
nodns Disable local DNS redirection through dnsmasq"
# include PirateBox shared functionality
. /etc/piratebox.common
-nodns() {
- pb_nodns
+setup() {
+ pb_usbsetup
+ pb_netconfig
}
init() {
@@ -23,6 +25,10 @@ update() {
pb_update
}
+nodns() {
+ pb_nodns
+}
+
start() {
pb_mount usb
# init if we have a fresh USB disk
@@ -1,5 +1,5 @@
#############################################################################
-# PirateBox global config (do not change)
+# PirateBox global config. /etc/init.d/piratebox setup to take effect
pb_ip="192.168.1.1"
pb_wireless_ssid="PirateBox"

0 comments on commit 7661a57

Please sign in to comment.