-
Notifications
You must be signed in to change notification settings - Fork 2
How does mkPiratebox work?
The following steps are processed while install of the PirateBox package postinst:
-
Mount USB Drive
-
Stop & Disable running uhttpd & luci stuff
-
Enable Piratebox for startup
-
run piratebox-setup
-
run piratebox-init
-
run piratebox-update
-
restart firewall
-
(restart dnsmasq - removed in 0.3.3 )
-
reload wifi
-
start Piratebox
piratebox-setup
-
usbconfig ⇒ Create entry in /etc/config/fstab for mounting /dev/sda1 to /mnt/usb
-
netconfig ⇒ Set hostname, IP, do some /etc/config/network , enable wireless, set SSID ; stop dnsmasq
piratebox-init
-
mount /mnt/usb
-
create special swap device & activate it (function pb_mkswap )
-
create image file for /usr/local (called ext. loop image) ⇒ Unzip /usr/share/piratebox/OpenWRT.gz to usb and mount it. Do the /etc/config/fstab entries.
-
create piratebox-image (see pb_mkpbimg )
-
create opkg-destination in /etc/opkg.conf
-
Link external Image to /usr/local and do some other linking stuff.
piratebox-update
-
Take care that external Image is mounted
-
disable DNS redirection ( currently unproved function by cr )
-
remove opkg.lock if exits (Hack for running in postinst )
-
Check if libffi python python-mini exists on USB device and install it from there
-
if not; use internet, update opkg list and install python to external device
-
Undo opkg.lock Hack
-
link python to /usr/bin/
piratebox-start
-
Take care, that all needed loop imaged (ext, pb) and swap space is mounted
-
Expand PATH and LD_LIBARY_PATH with /usr/local
-
Create Share-Folder, if needed.
-
Start scripts located in /opt/piratebox/init.d/piratebox_router
pb_mkpbimg
-
if Piratebox-Image is mounted, unmount
-
take care, that USB is mounted
-
create mountpoint /opt/piratebox
-
if piratebox_img.gz exists on /mnt/usb use this file, if not, do wget and fetch the file
-
Unzip the file
-
Do /etc/config/fstab