Skip to content

Commit

Permalink
Merge pull request #3 from Fourdee/Testing
Browse files Browse the repository at this point in the history
v52 Release
  • Loading branch information
Fourdee committed May 7, 2015
2 parents 4f0c9fe + 4c621d2 commit 9d8a562
Show file tree
Hide file tree
Showing 17 changed files with 439 additions and 419 deletions.
4 changes: 4 additions & 0 deletions config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ framebuffer_height=720
# uncomment for composite PAL
#sdtv_mode=2

#-------RPi Camera Module-------
start_x=0
disable_camera_led=0

#-------GPU memory Splits-------
gpu_mem_256=16
gpu_mem_512=16
Expand Down
2 changes: 1 addition & 1 deletion dietpi/.auto_boot_index
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0
0
2 changes: 1 addition & 1 deletion dietpi/.install_stage
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-3
-3
2 changes: 1 addition & 1 deletion dietpi/.update_stage
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-1
-1
2 changes: 1 addition & 1 deletion dietpi/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
51
52
2 changes: 1 addition & 1 deletion dietpi/boot
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,6 @@
echo -e "0" > /boot/dietpi/.install_stage
fi

#Run whole script in a function. Loads into memory, allows for online file patching.
#Run whole script inside a function. Loads into memory, allows for online file patching.
exit
}
Binary file removed dietpi/conf/desktop/dietpi-wallpaper.png
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 64,
"cache-size-mb": 48,
"dht-enabled": true,
"download-dir": "/mnt/usb_1/downloads",
"download-limit": 100,
Expand All @@ -23,11 +23,11 @@
"incomplete-dir": "/mnt/usb_1/bt-inprogress",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"max-peers-global": 12,
"max-peers-global": 8,
"message-level": 0,
"peer-congestion-algorithm": "",
"peer-limit-global": 12,
"peer-limit-per-torrent": 7,
"peer-limit-global": 8,
"peer-limit-per-torrent": 5,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
Expand All @@ -39,7 +39,7 @@
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 1.0,
"ratio-limit": 1.1,
"ratio-limit-enabled": true,
"rename-partial-files": true,
"rpc-authentication-required": true,
Expand Down
70 changes: 0 additions & 70 deletions dietpi/conf/transmission_settings_c1

This file was deleted.

70 changes: 0 additions & 70 deletions dietpi/conf/transmission_settings_p2

This file was deleted.

83 changes: 61 additions & 22 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,36 @@
if [ "$hdmi_boost_disabled" = 1 ]; then
hdmi_boost_text='Disabled'
fi


local rpi_camera_module_enabled=$(cat /boot/config.txt | grep -ci -m1 'start_x=1')
local rpi_camera_module_text='Disabled'
if (( $rpi_camera_module_enabled == 1 )); then
rpi_camera_module_text='Enabled'
fi


local rpi_camera_led_enabled=$(cat /boot/config.txt | grep -ci -m1 'disable_camera_led=0')
local rpi_camera_led_text='Disabled'
if (( $rpi_camera_led_enabled == 1 )); then
rpi_camera_led_text='Enabled'
fi

#Odroid C1
if (( $HW_MODEL == 10 )); then
hdmi_boost_text=$HW_MSG_NOTSUPPORTED
overscan_text=$HW_MSG_NOTSUPPORTED
rpi_camera_module_text=$HW_MSG_NOTSUPPORTED
rpi_camera_led_text=$HW_MSG_NOTSUPPORTED
fi

WHIP_TITLE='---------- DietPi - Display Options ----------'
OPTION=$(whiptail --title "$WHIP_TITLE" --menu "Make a Selection" --cancel-button "Back" --backtitle "$WHIP_BACKTITLE" 15 50 4 \
OPTION=$(whiptail --title "$WHIP_TITLE" --menu "Make a Selection" --cancel-button "Back" --backtitle "$WHIP_BACKTITLE" 16 50 6 \
"1" "Change Resolution" \
"2" "GPU/RAM Memory Split" \
"3" "Overscan : $overscan_text" \
"4" "HDMI Boost : $hdmi_boost_text" 3>&1 1>&2 2>&3)
"3" "Overscan : $overscan_text" \
"4" "HDMI Boost : $hdmi_boost_text" \
"5" "RPi Camera : $rpi_camera_module_text" \
"6" "RPI Camera led : $rpi_camera_led_text" 3>&1 1>&2 2>&3)

CHOICE=$?
if (( $CHOICE == 0 )); then
Expand Down Expand Up @@ -215,6 +232,37 @@

#Return to This Menu
TARGETMENUID=1

elif (( $OPTION == 5 )); then
#Odroid C1
if (( $HW_MODEL == 10 )); then
HW_OptionNotSupported
elif (( $rpi_camera_module_enabled == 0 )); then
#enable module
sed -i '/start_x=/c\start_x=1' /boot/config.txt
REBOOT_REQUIRED=true
else
#disable module
sed -i '/start_x=/c\start_x=0' /boot/config.txt
REBOOT_REQUIRED=true
fi
#Return to This Menu
TARGETMENUID=1
elif (( $OPTION == 6 )); then
#Odroid C1
if (( $HW_MODEL == 10 )); then
HW_OptionNotSupported
elif (( $rpi_camera_led_enabled == 0 )); then
#enable
sed -i '/disable_camera_led=/c\disable_camera_led=0' /boot/config.txt
REBOOT_REQUIRED=true
else
#disable
sed -i '/disable_camera_led=/c\disable_camera_led=1' /boot/config.txt
REBOOT_REQUIRED=true
fi
#Return to This Menu
TARGETMENUID=1
fi
fi
}
Expand Down Expand Up @@ -665,7 +713,7 @@
local display_output_text="Enabled"
local display_vpu_text="Enabled"

if [ "$HW_MODEL" = 0 ]; then
if (( $HW_MODEL == 0 )); then
gpu_mem_value=$(grep 'gpu_mem_256=' /boot/config.txt | sed 's/gpu_mem_256=//g')
ram_mem_value=$((256-gpu_mem_value))
elif (( $HW_MODEL == 1 )); then
Expand Down Expand Up @@ -799,8 +847,8 @@
OPTION=$(whiptail --title "$WHIP_TITLE" --menu " Hardware : $HW_MODEL_DESCRIPTION \n Current: $gpu_mem_value MB GPU | $ram_mem_value MB RAM" --cancel-button "Back" --backtitle "$WHIP_BACKTITLE" 14 75 4 \
"Server" "16 MB GPU | 1008 MB RAM" \
"Desktop" "128MB GPU | 896 MB RAM" \
"Kodi" "256MB GPU | 768 MB RAM" \
"Gaming" "384MB GPU | 640 MB RAM" 3>&1 1>&2 2>&3)
"Kodi" "192MB GPU | 832 MB RAM" \
"Gaming" "256MB GPU | 768 MB RAM" 3>&1 1>&2 2>&3)

case "$OPTION" in
Server)
Expand All @@ -816,13 +864,13 @@
TARGETMENUID=6
;;
Kodi)
gpu_target_value=256
gpu_target_value=192
REBOOT_REQUIRED=true
#Return to this menu
TARGETMENUID=6
;;
Gaming)
gpu_target_value=384
gpu_target_value=256
REBOOT_REQUIRED=true
#Return to this menu
TARGETMENUID=6
Expand Down Expand Up @@ -1082,7 +1130,7 @@
INTERNET_ONLINE=0 #Not tested

#Check for connection
wget -q --spider $INTERNET_URL
wget -q --spider --timeout=6 --tries=1 $INTERNET_URL
if [ $? -eq 0 ]; then
INTERNET_ONLINE=2 #Online
else
Expand Down Expand Up @@ -1459,8 +1507,6 @@
#Return to this Menu
TARGETMENUID=8
;;
*)
;;
esac
}

Expand Down Expand Up @@ -1695,8 +1741,7 @@
;;
USBHDD)
#Check USB is connected and mounted
local usb_hdd_connected=$(df -h | grep -ci -m1 '/dev/sda1')
if [ "$usb_hdd_connected" = 1 ]; then
if (( $(df -h | grep -ci -m1 '/dev/sda1') == 1 )); then
OPTION=$(whiptail --inputbox " Please Enter a filesize test value (MB). A value of 100 is recommended" 8 60 "$MAX_BENCHMARK_COUNT" --title "Benchmark File Size (MB)" 3>&1 1>&2 2>&3)
CHOICE=$?
if (( $CHOICE == 0 )); then
Expand All @@ -1719,14 +1764,12 @@
fi
#No Drive
else
whiptail --title "No USB Drive was found" --msgbox " No USB Drive was found, and/or, /dev/sda1 isnt mounted to /mnt/usb_1. \n The test has been aborted " --backtitle "$WHIP_BACKTITLE" 10 60
whiptail --title "No USB Drive was found" --msgbox " No USB Drive was found, and/or, /dev/sda1 isnt mounted to /mnt/usb_1. \n The test has been aborted." --backtitle "$WHIP_BACKTITLE" 10 60
fi

#Return to this menu
TARGETMENUID=12
;;
*)
;;
esac
}

Expand Down Expand Up @@ -1809,8 +1852,6 @@
#Return to this menu
TARGETMENUID=13
;;
*)
;;
esac
#Overclocking Pi2
elif (( $HW_MODEL == 2 )); then
Expand Down Expand Up @@ -1868,8 +1909,6 @@
#Return to this menu
TARGETMENUID=13
;;
*)
;;
esac
fi
}
Expand Down Expand Up @@ -2038,6 +2077,6 @@
fi

#-----------------------------------------------------------------------------------
#Run whole script in a function. Loads into memory, allows for online file patching.
#Run whole script inside a function. Loads into memory, allows for online file patching.
exit
}
Loading

0 comments on commit 9d8a562

Please sign in to comment.