Skip to content

Commit 8370426

Browse files
committed
Merge branch 'hotfix-1.1.4'
* hotfix-1.1.4: (40 commits) CHANGELOG: Update latest changes A bunch of fixes for timesave. - Apply shellcheck issues - Make timesave working properly on RPi images CHANGELOG: Add latest RPi fixes RPi: Fix r8188eu wifi detection problem Remove whitespace Changelog Add latest fixes Fix for radvd startup on OpenWrt IRC: cleaning up stop issues Adding latest RPi image generation changelog Adjust version to 1.1.4 CHANGELOG: add latest stuff Fixes IRC startup issues Rename to avoid confusion of git checkout development Add russian locale Run timesave systemd unit on shutdown Add note to change root password RPi: Move toward generated MotD Notice language files Add files via upload Note latest changes ...
2 parents 150ba18 + 759f6cd commit 8370426

26 files changed

Lines changed: 239 additions & 80 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ tmp/*
99
piratebox/piratebox/bin/miniircd.py
1010
piratebox/piratebox/www/Shared
1111
piratebox/piratebox/www/cgi-bin/data.pso
12+
piratebox/piratebox/rpi/motd.txt

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Contributors for modifications:
2626
# casdr
2727
# jdieg0
2828
# a-ira
29+
# ponsfrilus
2930
# ... and all others I might have forgotten.
3031

3132

CHANGELOG

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
CHANGELOG
22

3+
=== 1.1.4 ===
4+
* [New] Removed legacy redirect.html, use /index.html only
5+
* [New] install_piratebox.sh, avoid distribution of index files, if turned off.
6+
* [New] mime.types: Adding gpx mime-type
7+
* [New] [i8n] Spanish and Basque
8+
* [New] [i8n] Russian translation
9+
* [New] [RPi] Add all needed things to create a simple on/off button
10+
* [Changed] [RPi] MotD generation reworked and more dynamically
11+
* [Changed] [RPi] Run timesave-save function during shutdown
12+
* [Changed] [RPi] Work with en_US.UTF-8 per default
13+
* [Fix] diskusage: Fix wrong error message
14+
* [Fix] lang-de ; fix grammar
15+
* [Fix] [RPi] Fix wrong path in wifi client helper script
16+
* [Fix] [RPi] Fix issue with diskusage generation & usb share
17+
* [Fix] [RPi] Enable cronie for startup, which was missing
18+
* [Fix] [RPi] Fixed resolv.conf. A default entry is now available
19+
* [Fix] [RPi] Fixed detection of 8188eu
20+
* [Fix] [RPi] Store the installed hostap package in /prebuild/hostapd
21+
* [Fix] initd: minircd startup fix setuid
22+
* [Fix] initd: minircd fixing start-stop issues
23+
* [Fix] initd: Fix radvd path to an absolute path
24+
* [Fix] initd: Ugly hack for absolute path of radvd on OpenWrt
25+
* [Fix] WWW-Content, fix a syntax error which broke jQuery
26+
* [Fix] Refresh kareha download URL, which changed in year 2015
27+
* [Fix] diskusage: Adding missing </head> tag
28+
* [Fix] timesave: Shellcheck issues fixed
29+
* [Fix] timesave: Problems with date & time format at RPi fixed
30+
31+
332
=== 1.1.3 ===
433
* [New] Translation bt-pr
534
* [New] [RPi] Helper scripts to jump to wifi client mode
@@ -21,11 +50,11 @@ CHANGELOG
2150
* [Fix] Translation en,fr LibraryBox -> PirateBox
2251
* [Fix] Spellings in translation
2352
* [Fix] IRC startup command failed.
24-
* [Removed] exchange_www.sh
53+
* [Removed] exchange_www.sh
2554

2655
=== 1.1.0 ===
2756
* [New] Enable / Disable file provisioning for custom lighttpd directory listing
28-
* [New] ChatBox message is now in conf/chat_init.txt
57+
* [New] ChatBox message is now in conf/chat_init.txt
2958
* [New] Disable the Shoutbox to prevent writing into it
3059
* [New] PHP configuration shipped, to enable easily for modifications
3160
* [New] Mesh implementation, technical preview
@@ -41,7 +70,7 @@ CHANGELOG
4170
* [New] [OpenWrt] Enable all wifi devices with the PirateBox SSID
4271
* [New] [OpenWrt] AP Client isolation activated per default
4372
* [Changed] Send HTTP-Code 204 via PHP, much cleaner
44-
* [Changed] Update jQuery to 2.2.3, removes IE <=8 support
73+
* [Changed] Update jQuery to 2.2.3, removes IE <=8 support
4574
* [Changed] Redirect happens now always to wished domain name
4675
* [Changed] Droopy, make chmod operation optional (prevent errors on OpenWRT)
4776
* [Fix] License Adjustments
@@ -75,15 +104,15 @@ CHANGELOG
75104
* [New] Improved styling for droopy iframe.
76105
* [New] Timesave script service file to run set the time during startup.
77106
* [Fix] Droopy call in init.d/piratebox failed to use the correct port.
78-
* [Fix] Timesave script behaviour fixed on full Linux systems.
107+
* [Fix] Timesave script behaviour fixed on full Linux systems.
79108
* OpenWrt's date format is now customized during build & piratebox.conf .
80109

81-
=== 1.0.4 ===
110+
=== 1.0.4 ===
82111
* [New] New feature: /opt/piratebox/bin/board-autoconf.sh for setting up the imageboard
83112
* [New] Droopy update: Multiple upload
84113
* [New] Droopy update: In general user/password setting (non configurable via
85114
PirateBox)
86-
* [New] imageboard: inital dummy page for a not installed board.
115+
* [New] imageboard: inital dummy page for a not installed board.
87116
* [New] Send HTTP-Code 204 for Android devices, avoids captive Portal and leaving devices.
88117

89118
* [Fix] Some script cleanups
@@ -120,11 +149,11 @@ CHANGELOG
120149
* [New] Service File for RPi image
121150
* [Fix] Several typos in scripts
122151
* [Fix] Typo in front page and directory listing
123-
* [Fix] in timsave.sh while restoring date&time
124-
* [Fix] [OpenWRT] Timesave create bootup restore
125-
* [Fix] [OpenWRT] Fix for not working "already installed" recognition to skip parts
152+
* [Fix] in timsave.sh while restoring date&time
153+
* [Fix] [OpenWRT] Timesave create bootup restore
154+
* [Fix] [OpenWRT] Fix for not working "already installed" recognition to skip parts
126155
* [Fix] [OpenWRT] Fix for errors during installing piratebox-mod-imageboard because of duplicate links
127-
* [Fix] [OpenWRT] Fix for LED flashing during auto install (box-installer on image)
156+
* [Fix] [OpenWRT] Fix for LED flashing during auto install (box-installer on image)
128157
* [Fix] [OpenWRT] Fix error messages on package reinstall. (extendRoot)
129158
* [Fix] No dublicates symlink after double "part2" via install_piratebox.sh
130159
* [New] Remove # in front of secret & password to force user to change it before using the board
@@ -154,9 +183,9 @@ NOTE: This may only be a partial changelog, check github / your package manager
154183
* [Removed] [Testing] Executable, we will stick to service based
155184
* [Fixed] Overwritten saved timestamp with 1970 one
156185
* [New] possibility in install_piratebox.sh to exchange the hostname easily
157-
* [New] Moved DHCP leasefile into memory on OpenWRT system (/tmp is memory)
186+
* [New] Moved DHCP leasefile into memory on OpenWRT system (/tmp is memory)
158187
* [Fix] Timesave script does not contain parts for OpenWRT anymore
159-
* [Fix] Timesave-file location is now configured in piratebox.conf
188+
* [Fix] Timesave-file location is now configured in piratebox.conf
160189
* [Fix] Fix in Changing hostname functionality
161190
* [New] Hostname changing generates the redirect.html now based on a Schema file
162191
* [New] Added JSON Mime-Type

Makefile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
NAME = piratebox-ws
2-
VERSION = 1.1.3
2+
VERSION = 1.1.4
33
ARCH = all
44
PB_FOLDER=piratebox
55
PB_SRC_FOLDER=$(PB_FOLDER)/$(PB_FOLDER)
66

77
PACKAGE_NAME=$(NAME)_$(VERSION)
88
PACKAGE=$(PACKAGE_NAME).tar.gz
99
VERSION_FILE=$(PB_FOLDER)/$(PB_FOLDER)/version
10+
MOTD=$(PB_FOLDER)/$(PB_FOLDER)/rpi/motd.txt
1011

1112
IMAGE_FILE=piratebox_ws_1.1_img.gz
1213
TGZ_IMAGE_FILE=piratebox_ws_1.1_img.tar.gz
@@ -32,16 +33,18 @@ $(IRC_TARGET_SERVER):
3233
git clone $(IRC_GITHUB_ULR) $(IRC_WORK_FOLDER)
3334
cp $(IRC_SRC_SERVER) $(IRC_TARGET_SERVER)
3435

35-
$(VERSION):
36+
$(MOTD):
37+
sed -e 's|##version##|$(VERSION)|' rpi.motd-template.txt > $@
38+
39+
$(VERSION):
3640
echo "$(PACKAGE_NAME)" > $(VERSION_FILE)
3741
echo `git status -sb --porcelain` >> $(VERSION_FILE)
3842
echo ` git log -1 --oneline` >> $(VERSION_FILE)
3943

40-
$(PACKAGE): $(IRC_TARGET_SERVER) $(VERSION)
41-
tar czf $@ $(PB_FOLDER)
42-
44+
$(PACKAGE): $(IRC_TARGET_SERVER) $(VERSION) $(MOTD)
45+
tar czf $@ $(PB_FOLDER)
4346

44-
$(IMAGE_FILE): $(IRC_TARGET_SERVER) $(VERSION) $(SRC_IMAGE_UNPACKED) $(OPENWRT_CONFIG_FOLDER) $(OPENWRT_BIN_FOLDER)
47+
$(IMAGE_FILE): $(IRC_TARGET_SERVER) $(VERSION) $(SRC_IMAGE_UNPACKED) $(OPENWRT_CONFIG_FOLDER) $(OPENWRT_BIN_FOLDER) $(MOTD)
4548
mkdir -p $(MOUNT_POINT)
4649
echo "#### Mounting image-file"
4750
sudo mount -o loop,rw,sync $(SRC_IMAGE_UNPACKED) $(MOUNT_POINT)
@@ -66,7 +69,7 @@ $(OPENWRT_CONFIG_FOLDER):
6669
sed 's:DROOPY_USE_USER="yes":DROOPY_USE_USER="no":' -i $@/piratebox.conf
6770
sed 's:DROOPY_CHMOD:#DROOPY_CHMOD:' -i $@/piratebox.conf
6871
sed 's:LEASE_FILE_LOCATION=$$PIRATEBOX_FOLDER/tmp/lease.file:LEASE_FILE_LOCATION=/tmp/lease.file:' -i $@/piratebox.conf
69-
sed 's:TIMESAVE_FORMAT="":TIMESAVE_FORMAT="+%C%g%m%d%H%M":' -i $@/piratebox.conf
72+
sed 's:TIMESAVE_FORMAT="+%C%g%m%d %H%M":TIMESAVE_FORMAT="+%C%g%m%d%H%M":' -i $@/piratebox.conf
7073
sed 's:FIREWALL_FETCH_DNS="yes":FIREWALL_FETCH_DNS="no":' -i $@/firewall.conf
7174
sed 's:FIREWALL_FETCH_HTTP="yes":FIREWALL_FETCH_HTTP="no":' -i $@/firewall.conf
7275

@@ -93,7 +96,7 @@ clean: cleanimage
9396
rm -fr $(IRC_WORK_FOLDER)
9497
rm -f $(IRC_TARGET_SERVER)
9598
rm -f $(PACKAGE)
96-
rm -f $(VERSION_FILE)
99+
rm -f $(VERSION_FILE) $(MOTD)
97100

98101
cleanimage:
99102
- rm -f $(TGZ_IMAGE_FILE)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $HTTP["url"] =~ "^/board/" {
8181

8282
# 404 Error Page with redirect
8383
#
84-
#server.error-handler-404 = "/redirect.html"
84+
#server.error-handler-404 = "/index.html"
8585

8686
## for better debugging
8787
#server.modules += ( "mod_accesslog" )
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $HTTP["url"] =~ "^/board/" {
8181

8282
# 404 Error Page with redirect
8383
#
84-
#server.error-handler-404 = "/redirect.html"
84+
#server.error-handler-404 = "/index.html"
8585

8686
## for better debugging
8787
#server.modules += ( "mod_accesslog" )

piratebox/piratebox/bin/install_piratebox.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ if [ $2 = 'part2' ] ; then
6666
mkdir -p $PIRATEBOX_FOLDER/tmp
6767

6868
#Distribute the Directory Listing files
69-
$PIRATEBOX_FOLDER/bin/distribute_files.sh $SHARE_FOLDER/Shared true
69+
if [ "$CUSTOM_DIRLIST_COPY" = "yes" ] ; then
70+
$PIRATEBOX_FOLDER/bin/distribute_files.sh $SHARE_FOLDER/Shared true
71+
fi
7072
#Set permissions
7173
chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $PIRATEBOX_FOLDER/share -R
7274
chmod u+rw $PIRATEBOX_FOLDER/share
@@ -101,7 +103,7 @@ if [ $2 = 'imageboard' ] ; then
101103
KAREHA_RELEASE=kareha_3.1.4.zip
102104
if [ ! -e $PIRATEBOX_FOLDER/tmp/$KAREHA_RELEASE ] ; then
103105
echo " Wgetting kareha-zip file "
104-
wget http://wakaba.c3.cx/releases/$KAREHA_RELEASE
106+
wget http://wakaba.c3.cx/releases/Kareha/$KAREHA_RELEASE
105107
if [ "$?" != "0" ] ; then
106108
echo "wget kareha failed.. you can place the current file your to $PIRATEBOX_FOLDER/tmp "
107109
fi
@@ -161,7 +163,7 @@ fi
161163
set_hostname() {
162164
local name=$1 ; shift;
163165

164-
sed "s|#####HOST#####|$name|g" $PIRATEBOX_FOLDER/src/redirect.html.schema > $WWW_FOLDER/redirect.html
166+
sed "s|#####HOST#####|$name|g" $PIRATEBOX_FOLDER/src/redirect.html.schema > $WWW_FOLDER/index.html
165167
sed "s|HOST=\"$HOST\"|HOST=\"$name\"|" -i $PIRATEBOX_CONFIG
166168
}
167169

piratebox/piratebox/bin/timesave.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ get_datetime() {
1919

2020
# Strip spaces from datetime
2121
sanitize_datetime() {
22-
echo $1 | sed s/" "/""/g
22+
echo "$1" | sed s/" "/""/g
2323
}
2424

2525
# Print usage if parameters are not provided
26-
if [ -z $1 ] || [ -z $2 ] ; then
26+
if [ -z "$1" ] || [ -z "$2" ] ; then
2727
echo "Set up a crontab entry for regulary saving the time"
2828
echo "Usage $0 <path to piratebox.conf> <step>"
2929
echo " Valid steps are:"
@@ -35,7 +35,7 @@ if [ -z $1 ] || [ -z $2 ] ; then
3535
fi
3636

3737
# Load configfile
38-
. $1
38+
. "$1"
3939

4040
if [ "$2" = "install" ] ; then
4141
crontab -l > $PIRATEBOX_FOLDER/tmp/crontab 2> /dev/null
@@ -44,9 +44,9 @@ if [ "$2" = "install" ] ; then
4444
crontab $PIRATEBOX_FOLDER/tmp/crontab
4545

4646
echo "initialize timesave file"
47-
touch $TIMESAVE
48-
chmod a+rw $TIMESAVE
49-
get_datetime > $TIMESAVE
47+
touch "$TIMESAVE"
48+
chmod a+rw "$TIMESAVE"
49+
get_datetime > "$TIMESAVE"
5050

5151
echo "Remember MAY have to cron active..."
5252
echo " on OpenWrt run: /etc/init.d/piratebox enable"
@@ -56,14 +56,14 @@ fi
5656

5757
# Save current date-time in a recoverable format
5858
if [ "$2" = "save" ] ; then
59-
if [ -e $TIMESAVE ] ; then
59+
if [ -e "$TIMESAVE" ] ; then
6060
if [ $(sanitize_datetime "$(get_datetime)") -lt $(sanitize_datetime "$(cat $TIMESAVE)") ] ; then
6161
logger -s "$0: Current date-time is lower then saved one. Not saving!"
6262
exit 1
6363
fi
6464
fi
6565

66-
get_datetime > $TIMESAVE
66+
get_datetime > "$TIMESAVE"
6767
exit 0
6868
fi
6969

piratebox/piratebox/conf/lighttpd/lighttpd.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ setenv.add-response-header += ( "Cache-Control" => "max-age=60, must-revalidate,
9999

100100
# 404 Error Page with redirect
101101
#
102-
server.error-handler-404 = "/redirect.html"
102+
server.error-handler-404 = "/index.html"
103103

104104
## for better debugging
105105
#server.modules += ( "mod_accesslog" )

piratebox/piratebox/conf/lighttpd/mime.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ mimetype.assign = (
8787
".epub" => "application/epub+zip",
8888
".fb2" => "text/xml",
8989
".svg" => "image/svg+xml",
90-
90+
".gpx" => "application/gpx+xml",
9191
# make the default mime type application/octet-stream.
9292
"" => "application/octet-stream",
9393
)

0 commit comments

Comments
 (0)