Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

stability release, added USB checks, doc updated

  • Loading branch information...
commit 7090202b1cb430f57f58a923255bee244acb31d5 1 parent 5290d3b
@cr cr authored
View
2  Makefile
@@ -1,5 +1,5 @@
NAME = piratebox
-VERSION = 0.2-3
+VERSION = 0.2-4
ARCH = all
IPK = $(NAME)_$(VERSION)_$(ARCH).ipk
IPKDIR = src
View
15 README
@@ -1,5 +1,5 @@
###########################################################################
-# mkPirateBox v0.2-3
+# mkPirateBox v0.2-4
# IPKG that installs PirateBox to your fresh OpenWRT router
# (C) 2011, Christiane Ruetten, cr@23bit.net
#
@@ -43,13 +43,20 @@ REQUIREMENTS:
- 125 MHz systems work, but HTTP uploads may drop dramatically to
about 100 KByte/s.
- An external USB hard drive (UMS compatible) formattet with FAT32.
+ Keep in mind that some routers are unable to provide sufficient
+ USB power to spin-up HD drives, while USB flash drives should work
+ fine in any case.
- Two ethernet cables
INSTALL:
- Install a fresh OpenWRT "Backfire" 10.03.1 onto your router.
I mean really fresh. Do not touch it after you flashed it!
- If you already have an unclean install, do rm -rf /overlay/*
- and reboot the router.
+ If you already have an unclean install, do a reflash or
+ rm -rf /overlay/* and reboot the router.
+ - Please note that some systems don't support easy wipes with
+ the rm -rf /overlay/* method. You can spot these by an empty
+ /verlay directory. In these cases, you mus reflash the
+ OpenWRT image for a clean install.
- Make sure your Internet router does not use the IP address
192.168.1.1 or any other address from the 192.168.1.0 subnet.
Set it to 192.168.42.1 (with subnet mask 255.255.255.0),
@@ -61,7 +68,7 @@ INSTALL:
with a FAT32 file system.
- telnet into the router on 192.168.1.1.
- cd /tmp
- - wget http://cr.23bit.net/piratebox/piratebox_0.2-3_all.ipk
+ - wget http://cr.23bit.net/piratebox/piratebox_0.2-4_all.ipk
(Sorry, github only supports https downloads.)
- opkg update && opkg install piratebox*
- When prompted, set a root password.
View
BIN  piratebox_0.2-3_all.ipk
Binary file not shown
View
BIN  piratebox_0.2-4_all.ipk
Binary file not shown
View
2  src/control/control
@@ -1,5 +1,5 @@
Package: piratebox
-Version: 0.2-3
+Version: 0.2-4
Depends: kmod-usb2, kmod-usb-storage, kmod-fs-vfat, kmod-nls-cp437, kmod-nls-cp850, kmod-nls-iso8859-1, kmod-nls-iso8859-15, kmod-fs-ext3, block-mount, kmod-loop, losetup
Provides:
Source: package/piratebox
View
3  src/control/postinst
@@ -3,6 +3,9 @@
# include PirateBox shared functionality
. /etc/piratebox.common
+# wait for USB disk to show up
+pb_usbwait
+
# check if root password is not set yet
if grep '^root:!:' /etc/passwd >/dev/null
then
View
20 src/data/etc/piratebox.common
@@ -21,6 +21,25 @@ pb_nodns() {
cp /tmp/resolv.conf.auto /tmp/resolv.conf
}
+pb_usbwait() {
+ # wait for USB device to show up
+ if [ ! -e "$pb_usbdevice" ]
+ then
+ echo "Please connect USB disk. If it is already plugged-in,"
+ echo "wait for a few seconds, and if nothing happens, please"
+ echo "reconnect the device. Keep in mind that your router's"
+ echo "ports may not be able to supply enough power to"
+ echo "spin-up a USB HDD."
+ while [ ! -e "$pb_usbdevice" ]
+ do
+ sleep 1
+ echo -n "."
+ done
+ echo
+ echo "USB disk is now available. Continuing..."
+ fi
+}
+
pb_ismounted() {
mount | grep "on $1 " >/dev/null
}
@@ -202,6 +221,7 @@ pb_mkextimg() {
pb_init() {
echo "${initscript}: Mounting external USB storage..."
+
pb_mount usb
[ -d "$pb_usbdir" ] || mkdir -p "$pb_usbdir"
Please sign in to comment.
Something went wrong with that request. Please try again.