Skip to content

Commit

Permalink
Merge pull request MichaIng#480 from Fourdee/testing
Browse files Browse the repository at this point in the history
v129
(21/08/16)

Changes / Improvements / Optimizations:

DietPi-Software | rTorrent + ruTorrent | is now available for installation in the DietPi optimized software menu. Many thanks to Ardakilic for his input, and to help make this installation possible: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=2603#p2603

DietPi-Software | Owncloud installation updated to latest stable (9.1): https://github.com/Fourdee/DietPi/issues/468

DietPi-Software | Added 'autoconf automake' packages to Build-Essential installation.

DietPi-Config | Added multiple display resolutions and refresh rates for Odroid C2: https://github.com/Fourdee/DietPi/issues/469

DietPi-Bugreport | Now allows for a max 50MB bug report upload.

Bug fixes:

DietPi-Config | RPi 2/3/Zero will now show correct sdram speed (450mhz default) in the overclocking menu: https://github.com/Fourdee/DietPi/issues/471

DietPi-Config | RPi Zero overclocking profiles have been removed: https://github.com/Fourdee/DietPi/issues/471

DietPi-Set_Hardware | Resolved an issue where disabling wifi modules would not clear the blacklist file, before being saved.

DietPi-Software | Resolved an issue where min GPU memory splits were not being applied.

DietPi-Config | When enabling WiFi for the 1st time, DHCP will be the default setting.

DietPi-Config | WiFi stats (speed and strength) for RPi 3 onboard wifi is now working correctly.

DietPi-Software | Deluge: Resolved an issue where remote thinclients were unable to connect. Many thanks to John for spotting this one: http://dietpi.com/phpbb/viewtopic.php?f=11&t=602
  • Loading branch information
Fourdee committed Aug 21, 2016
2 parents 438cd79 + 0f084a0 commit 6e22286
Show file tree
Hide file tree
Showing 17 changed files with 953 additions and 409 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
v129
(21/08/16)

Changes / Improvements / Optimizations:
DietPi-Software | rTorrent + ruTorrent | is now available for installation in the DietPi optimized software menu. Many thanks to Ardakilic for his input, and to help make this installation possible: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=2603#p2603
DietPi-Software | Owncloud installation updated to latest stable (9.1): https://github.com/Fourdee/DietPi/issues/468
DietPi-Software | Added 'autoconf automake' packages to Build-Essential installation.
DietPi-Config | Added multiple display resolutions and refresh rates for Odroid C2: https://github.com/Fourdee/DietPi/issues/469
DietPi-Bugreport | Now allows for a max 50MB bug report upload.

Bug fixes:
DietPi-Config | RPi 2/3/Zero will now show correct sdram speed (450mhz default) in the overclocking menu: https://github.com/Fourdee/DietPi/issues/471
DietPi-Config | RPi Zero overclocking profiles have been removed: https://github.com/Fourdee/DietPi/issues/471
DietPi-Set_Hardware | Resolved an issue where disabling wifi modules would not clear the blacklist file, before being saved.
DietPi-Software | Resolved an issue where min GPU memory splits were not being applied.
DietPi-Config | When enabling WiFi for the 1st time, DHCP will be the default setting.
DietPi-Config | WiFi stats (speed and strength) for RPi 3 onboard wifi is now working correctly.
DietPi-Software | Deluge: Resolved an issue where remote thinclients were unable to connect. Many thanks to John for spotting this one: http://dietpi.com/phpbb/viewtopic.php?f=11&t=602

-----------------------------------------------------------------------------------------------------------

v128
(10/08/16)

Expand Down
2 changes: 1 addition & 1 deletion dietpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ AUTO_DietpiSoftware_WebserverIndex=-2

#DietPi-Autostart | Requires AUTO_Install_Enable=1
# After installation is completed, which program should the system boot to?
# 0=Console 7=Console+auto root login | 1=Kodi 2=Desktops (LXDE/MATE etc) 5=DietPi-Cloudshell
# 0=Console 7=Console+auto root login | 1=Kodi 2=Desktops (LXDE/MATE etc) 5=DietPi-Cloudshell 6=Uae4ARM (Fastboot) 8=Uae4ARM (standard boot)
AUTO_AutoStartTarget=0

#Language/Regional settings | Requires AUTO_Install_Enable=1
Expand Down
2 changes: 1 addition & 1 deletion dietpi/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
128
129
93 changes: 59 additions & 34 deletions dietpi/boot
Original file line number Diff line number Diff line change
Expand Up @@ -39,43 +39,56 @@
#RPi's
if (( $HW_MODEL < 10 )); then

#If no overclocking is set.
if (( $(cat /DietPi/config.txt | grep -ci -m1 '^#over_voltage=') == 1 )) &&
(( $(cat /DietPi/config.txt | grep -ci -m1 '^#arm_freq=') == 1 )) &&
(( $(cat /DietPi/config.txt | grep -ci -m1 '^#core_freq=') == 1 )) &&
(( $(cat /DietPi/config.txt | grep -ci -m1 '^#sdram_freq=') == 1 )); then
#If no overclocking is set. set values to current (used in dietpi-config as reference for overclocking / current values)
if (( $(cat /DietPi/config.txt | grep -ci -m1 '^#over_voltage=') &&
$(cat /DietPi/config.txt | grep -ci -m1 '^#arm_freq=') &&
$(cat /DietPi/config.txt | grep -ci -m1 '^#core_freq=') &&
$(cat /DietPi/config.txt | grep -ci -m1 '^#sdram_freq=') )); then

#RPi v1 - Set safe clock
if (( $HW_MODEL < 2 )); then

sed -i '/over_voltage=/c\over_voltage=2' /DietPi/config.txt
sed -i '/arm_freq=/c\arm_freq=900' /DietPi/config.txt
sed -i '/core_freq=/c\#core_freq=250' /DietPi/config.txt
sed -i '/sdram_freq=/c\#sdram_freq=400' /DietPi/config.txt
#RPi v2 - set values to current (used in dietpi-config as reference for overclocking / current values)

#Zero
if (( $(cat /DietPi/dietpi/.hw_model | tr '[:upper:]' '[:lower:]' | grep -ci -m1 'rpi zero') )); then

sed -i '/over_voltage=/c\#over_voltage=0' /DietPi/config.txt
sed -i '/arm_freq=/c\#arm_freq=1000' /DietPi/config.txt
sed -i '/core_freq=/c\#core_freq=400' /DietPi/config.txt
sed -i '/sdram_freq=/c\#sdram_freq=450' /DietPi/config.txt

fi

#RPi v2
elif (( $HW_MODEL == 2 )); then

sed -i '/over_voltage=/c\#over_voltage=0' /DietPi/config.txt
sed -i '/arm_freq=/c\#arm_freq=900' /DietPi/config.txt
sed -i '/core_freq=/c\#core_freq=250' /DietPi/config.txt
sed -i '/sdram_freq=/c\#sdram_freq=400' /DietPi/config.txt
#RPi v3 - set values to current (used in dietpi-config as reference for overclocking / current values)
sed -i '/sdram_freq=/c\#sdram_freq=450' /DietPi/config.txt

#RPi v3
elif (( $HW_MODEL == 3 )); then

sed -i '/over_voltage=/c\#over_voltage=0' /DietPi/config.txt
sed -i '/arm_freq=/c\#arm_freq=1200' /DietPi/config.txt
sed -i '/core_freq=/c\#core_freq=400' /DietPi/config.txt
sed -i '/sdram_freq=/c\#sdram_freq=400' /DietPi/config.txt
sed -i '/sdram_freq=/c\#sdram_freq=450' /DietPi/config.txt
sed -i "/temp_limit=/c\temp_limit=75" /DietPi/config.txt # https://github.com/Fourdee/DietPi/issues/356

fi

fi

fi
}

Partition_SD(){

#Stop Services
/DietPi/dietpi/dietpi-services stop

cat << _EOF_ | fdisk /dev/mmcblk0
p
d
Expand All @@ -94,11 +107,9 @@ _EOF_

Expand_SD(){

# Stop Services
/DietPi/dietpi/dietpi-services stop

# Resize Filesystem to new partition size
#Resize Filesystem to new partition size
resize2fs /dev/mmcblk0p2

}

Apply_DietPi_FirstRun_Settings(){
Expand Down Expand Up @@ -127,6 +138,7 @@ _EOF_

# - Wifi
if (( $Wifi_Enabled == 1 )); then

#Enable Wlan, disable Eth
Ethernet_Enabled=0
sed -i "/allow-hotplug wlan/c\allow-hotplug wlan$index_wlan" /etc/network/interfaces
Expand All @@ -143,10 +155,12 @@ _EOF_

# - Ethernet
elif (( $Ethernet_Enabled == 1 )); then

#Enable Eth, disable Wlan
Wifi_Enabled=0
sed -i "/allow-hotplug eth/c\allow-hotplug eth$index_eth" /etc/network/interfaces
sed -i "/allow-hotplug wlan/c\#allow-hotplug wlan$index_wlan" /etc/network/interfaces

fi

# - Static IPs
Expand All @@ -156,9 +170,13 @@ _EOF_
sed -i 's/^#dns-nameservers/dns-nameservers/g' /etc/network/interfaces

if (( $Wifi_Enabled == 1 )); then

sed -i "/iface wlan/c\iface wlan$index_wlan inet static" /etc/network/interfaces

elif (( $Ethernet_Enabled == 1 )); then

sed -i "/iface eth/c\iface eth$index_eth inet static" /etc/network/interfaces

fi

sed -i "/address/c\address $Static_IP" /etc/network/interfaces
Expand All @@ -168,25 +186,24 @@ _EOF_
fi

#Kill dhclient
killall dhclient &> /dev/null
killall -w dhclient

#Drop Connections
ifdown eth"$index_eth" &> /dev/null
ifdown wlan"$index_wlan" &> /dev/null
ifdown eth"$index_eth"
ifdown wlan"$index_wlan"

#Start Networking (disabled after /DietPi/dietpi/finalize)
if (( $DISTRO == 3 )); then
systemctl restart network.service
else
/etc/init.d/networking reload
/etc/init.d/networking restart
fi
systemctl restart network.service

#Manually bring up adapters (just incase)
if (( $Wifi_Enabled == 1 )); then

ifup wlan"$index_wlan"

elif (( $Ethernet_Enabled == 1 )); then

ifup eth"$index_eth"

fi

#Wait for active connection, then update network details file
Expand Down Expand Up @@ -224,9 +241,6 @@ _EOF_
Run_Init(){

#----------------------------------------------------------------
#Set CRDA Country code
/DietPi/dietpi/func/dietpi-set_hardware wificountrycode &

#Update NTP (+thread)
local ntpd_update_mode=$(cat /DietPi/dietpi.txt | grep -m1 '^ntpd_update_mode=' | sed 's/.*=//')

Expand All @@ -240,17 +254,28 @@ _EOF_

#run, exit when updated.
else

ntpd -gq -l /var/log/ntpd.log &> /dev/null &

fi

fi
#----------------------------------------------------------------
#Write HW model and details to file
/DietPi/dietpi/dietpi-obtain_hw_model
#Read Hw model
Read_Hw_Model
#----------------------------------------------------------------
#Find first index number for network devices (checks 0-9)
/DietPi/dietpi/func/obtain_network_details
#Set CRDA Country code
local wifi_country_code=$(cat /DietPi/dietpi.txt | grep -m1 '^wifi_country_code=' | sed 's/.*=//')
if [ -n "$wifi_country_code" ]; then

/DietPi/dietpi/func/dietpi-set_hardware wificountrycode "$wifi_country_code" &

fi
#----------------------------------------------------------------
#Apply DietPi CPU Governor and settings (+thread)
/DietPi/dietpi/dietpi-cpu_set &
#----------------------------------------------------------------
#Disable RPi hdmi output if set in dietpi.txt
if (( $HW_MODEL < 10 &&
Expand All @@ -262,12 +287,14 @@ _EOF_

fi
#----------------------------------------------------------------
#Apply DietPi CPU Governor and settings (+thread)
/DietPi/dietpi/dietpi-cpu_set &
#Find first index number for network devices (checks 0-9)
/DietPi/dietpi/func/obtain_network_details
#----------------------------------------------------------------
#Ensure DietPi login and banner scripts always exists (eg: if user disables it)
if (( $(grep -ci -m1 '^/DietPi/dietpi/login' /root/.bashrc) == 0 )); then

echo -e "/DietPi/dietpi/login" >> /root/.bashrc

fi
#----------------------------------------------------------------
}
Expand Down Expand Up @@ -335,8 +362,6 @@ _EOF_
Expand_SD
echo -1 > /DietPi/dietpi/.install_stage

/DietPi/dietpi/dietpi-services stop

#Enable/Create swapfile.
/DietPi/dietpi/func/dietpi-set_dphys-swapfile $(cat /DietPi/dietpi.txt | grep -m1 '^Swapfile_Size=' | sed 's/.*=//' )

Expand Down
44 changes: 22 additions & 22 deletions dietpi/conf/nginx.site-available-default
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@
# /etc/nginx/sites-available/default

server {
listen 80 default_server;

root /var/www;
index index.php index.html index.htm;
listen 80 default_server;

server_name "$hostname";
root /var/www;
index index.php index.html index.htm;

location / {
try_files $uri $uri/ =404;
}
server_name "$hostname";

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www;
}
location / {
try_files $uri $uri/ =404;
}

location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www;
}

include /etc/nginx/sites-dietpi/*.config;
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

}
include /etc/nginx/sites-dietpi/*.config;

}
File renamed without changes.
12 changes: 12 additions & 0 deletions dietpi/conf/uae4arm-rpi.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=UAE4Arm Amiga Emulator
DefaultDependencies=no
#After=dietpi-service.service
#After=After=remote-fs.target

[Service]
ExecStart=/bin/bash -c "cd /etc/uae4arm-rpi/ && ./uae4arm-rpi -f conf/autostart.uae"
ExecStop=/usr/bin/killall -w -s SIGKILL uae4arm-rpi #SIGKILL for testing, endless wait on sigterm

[Install]
WantedBy=local-fs.target
Loading

0 comments on commit 6e22286

Please sign in to comment.