Skip to content

Commit

Permalink
Beta v6.31.2 (#3648)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Jul 5, 2020
2 parents 36f3278 + c5d259e commit 01ad51a
Show file tree
Hide file tree
Showing 20 changed files with 61 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@
</head>
<body>
<h2>DietPi-Survey report page</h2>
<i>Uploads since: 2019-01-01 00:00:00 UTC</i><br>
<i>Uploads since: 2020-01-01 00:00:00 UTC</i><br>
<i>Last update: $(TZ=UTC date "+%Y-%m-%d %T UTC")</i><br>
<br>
<table>
Expand Down
40 changes: 20 additions & 20 deletions CHANGELOG.txt

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions PREP_SYSTEM_FOR_DIETPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ Currently installed: $G_DISTRO_NAME (ID: $G_DISTRO)"; then

G_EXEC mv "DietPi-$G_GITBRANCH/dietpi.txt" /boot/
G_EXEC mv "DietPi-$G_GITBRANCH/README.md" /boot/dietpi-README.md
G_EXEC mv "DietPi-$G_GITBRANCH/LICENSE.txt" /boot/dietpi-LICENSE.txt
G_EXEC mv "DietPi-$G_GITBRANCH/LICENSE" /boot/dietpi-LICENSE.txt
G_EXEC mv "DietPi-$G_GITBRANCH/CHANGELOG.txt" /boot/dietpi-CHANGELOG.txt

# Reading version string for later use
Expand Down Expand Up @@ -1201,7 +1201,8 @@ _EOF_
# Below required if DietPi-PREP is executed from chroot/container, so RPi firstrun scripts are not executed
[[ -f '/etc/init.d/resize2fs_once' ]] && rm -v /etc/init.d/resize2fs_once # https://github.com/RPi-Distro/pi-gen/blob/master/stage2/01-sys-tweaks/files/resize2fs_once
[[ -f '/boot/cmdline.txt' ]] && sed -i 's| init=/usr/lib/raspi-config/init_resize\.sh||' /boot/cmdline.txt # https://github.com/RPi-Distro/pi-gen/blob/master/stage2/01-sys-tweaks/00-patches/07-resize-init.diff
[[ -f '/etc/systemd/system/getty@tty1.service.d/autologin.conf' ]] && rm -v /etc/systemd/system/getty@tty1.service.d/autologin.conf # https://github.com/MichaIng/DietPi/issues/3570#issuecomment-648988475
# - Remove all autologin configs for all TTYs: https://github.com/MichaIng/DietPi/issues/3570#issuecomment-648988475, https://github.com/MichaIng/DietPi/issues/3628#issuecomment-653693758
rm -fv /etc/systemd/system/*getty@*.service.d/*autologin*.conf

# - make_nas_processes_faster cron job on ROCK64 + NanoPi + PINE A64(?) images
[[ -f '/etc/cron.d/make_nas_processes_faster' ]] && rm /etc/cron.d/make_nas_processes_faster
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ along with this program. If not, see https://www.gnu.org/licenses/
### DietPi Files

- All files located in (recursively):
- `/DietPi/`
- `/var/lib/dietpi/`
- `/var/tmp/dietpi/`
- `/boot/dietpi/`
Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-cleaner
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Would you like to continue and start the cleaning process?" && Run_Cleaners

if (( $DRY_RUN )); then

read -p "
read -rp "
$G_PROGRAM_NAME simulation has finished: Press any key to continue..."

else
Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-cloudshell
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ _EOF_

clear
echo -e "$C_RESET"
read -p "Use CTRL+C to exit. Press any key to launch $G_PROGRAM_NAME..."
read -rp "Use CTRL+C to exit. Press any key to launch $G_PROGRAM_NAME..."

Run_Cloudshell

Expand Down
4 changes: 2 additions & 2 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ Current setting: $user_frequency_min_text" && G_CONFIG_INJECT 'CONFIG_CPU_MIN_FR

else

read -p 'Press any key to return to DietPi-Config...'
read -rp 'Press any key to return to DietPi-Config...'

fi

Expand Down Expand Up @@ -4507,7 +4507,7 @@ NB: If you need to use *.pool.ntp.org servers, enter the base domain only. The s
# Failsafe: Directory required for "noip2 -C" to create the config file there
mkdir -p /usr/local/etc
noip2 -C
read -p 'Press any key to continue...'
read -rp 'Press any key to continue...'
G_EXEC systemctl restart noip2

fi
Expand Down
8 changes: 4 additions & 4 deletions dietpi/dietpi-drive_manager
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ Do you wish to ignore this warning, and, mount the drive regardless?" || return

if G_EXEC_NOHALT=1 G_EXEC umount "$target"; then

sed -i "\#[[:blank:]]$target[[:blank:]]#d" /etc/fstab # Only needed for networked drives currently...
sed -i "\#[[:blank:]]${target}[[:blank:]]#d" /etc/fstab # Only needed for networked drives currently...
rmdir "$target"
Init_Drives_and_Refresh

Expand Down Expand Up @@ -1768,7 +1768,7 @@ NTFS:\nRecommended if you plan to use this drive on a Windows system. High CPU u
if mount -t cifs -o username="$samba_clientuser",password="$samba_clientpassword",iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=$i "//$samba_clientname/$samba_clientshare" "$samba_fp_mount_target" &>> $fp_tmp; then

# Apply to fstab
sed -i "\#[[:space:]]$samba_fp_mount_target[[:space:]]#d" /etc/fstab
sed -i "\#[[:space:]]${samba_fp_mount_target}[[:space:]]#d" /etc/fstab
# - NB: Convert spaces to '\040': https://github.com/MichaIng/DietPi/issues/1201#issuecomment-339720271
echo "//$samba_clientname/${samba_clientshare//[[:space:]]/\\040} $samba_fp_mount_target cifs username=$samba_clientuser,password=$samba_clientpassword,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=$i,_netdev,nofail,noauto,x-systemd.automount" >> /etc/fstab

Expand Down Expand Up @@ -1831,7 +1831,7 @@ NTFS:\nRecommended if you plan to use this drive on a Windows system. High CPU u
if mount -vt nfs -o port=2049 "$nfs_server_ip":/ $nfs_fp_mount_target &>> $fp_tmp; then

# Apply to fstab
sed -i "\#[[:space:]]$nfs_fp_mount_target[[:space:]]#d" /etc/fstab
sed -i "\#[[:space:]]${nfs_fp_mount_target}[[:space:]]#d" /etc/fstab
echo "$nfs_server_ip:/ $nfs_fp_mount_target nfs _netdev,nofail,noauto,x-systemd.automount" >> /etc/fstab

MENU_DRIVE_TARGET=$nfs_fp_mount_target
Expand All @@ -1854,7 +1854,7 @@ NTFS:\nRecommended if you plan to use this drive on a Windows system. High CPU u
if mount -vt nfs -o port=2049 "$nfs_server_ip":"$nfs_fp_server_share" $nfs_fp_mount_target &>> $fp_tmp; then

# Apply to fstab
sed -i "\#[[:space:]]$nfs_fp_mount_target[[:space:]]#d" /etc/fstab
sed -i "\#[[:space:]]${nfs_fp_mount_target}[[:space:]]#d" /etc/fstab
echo "$nfs_server_ip:$nfs_fp_server_share $nfs_fp_mount_target nfs _netdev,nofail,noauto,x-systemd.automount" >> /etc/fstab

MENU_DRIVE_TARGET=$nfs_fp_mount_target
Expand Down
7 changes: 4 additions & 3 deletions dietpi/dietpi-launcher
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# Info:
# - Location: /boot/dietpi/dietpi-launcher
# - Whiptail menu with list of all DietPi programs etc.
# - Whiptail menu with list of most DietPi programs
#
#////////////////////////////////////
# Import DietPi-Globals --------------------------------------------------------------
Expand All @@ -35,6 +35,7 @@
'DietPi-Drive_Manager' ': Setup and control multiple external drives'
'DietPi-AutoStart' ': Choose what software runs after boot'
'DietPi-Services' ': Service and process tool control'
'DietPi-LED_control' ': Adjust board LED triggers'
'DietPi-Cron' ': Modify the start times of cron jobs'
'DietPi-JustBoom' ': Launch EQ and MPD audio options menu'

Expand Down Expand Up @@ -95,13 +96,13 @@
else

G_DIETPI-NOTIFY 1 "The chosen program $G_WHIP_RETURNED_VALUE could not be found on your system."
read -p " - Press any key to return to $G_PROGRAM_NAME..."
read -rp " - Press any key to return to $G_PROGRAM_NAME..."
return

fi

# + Wait for user input
[[ $? != 0 || $command == 'dietpi-cpuinfo' || $command == 'dietpi-update' || $command == 'dietpi-morsecode' ]] && read -p "
[[ $? != 0 || $command == 'dietpi-cpuinfo' || $command == 'dietpi-update' || $command == 'dietpi-morsecode' ]] && read -rp "
- Press any key to return to $G_PROGRAM_NAME..."

else
Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-led_control
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# Import DietPi-Globals --------------------------------------------------------------
. /boot/dietpi/func/dietpi-globals
G_PROGRAM_NAME='DietPi-LED_Control'
G_PROGRAM_NAME='DietPi-LED_control'
G_CHECK_ROOT_USER
G_CHECK_ROOTFS_RW
G_INIT
Expand Down
9 changes: 2 additions & 7 deletions dietpi/dietpi-letsencrypt
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,8 @@ Would you like to switch to DietPi-Software, to install one of the above?' && /b

#------------------------------------------------------------------------------------------------------

if (( ! $INPUT )); then

read -p '
Press any key to continue...
'

fi
(( $INPUT )) || read -rp '
Press any key to continue...'

}

Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -16372,7 +16372,7 @@ Do you wish to continue with DietPi as a pure minimal image?'; then
tty=$(readlink -f /dev/serial0); tty={tty#/dev/}
if [[ $(</boot/cmdline.txt) =~ 'serial0' ]]; then

[[ $(</boot/cmdline.txt) =~ $tty ]] && sed -i "s/[[:blank:]]*console=$tty[^\"[:blank:]]*//" /boot/cmdline.txt || sed -i "s/serial0/$tty/" /boot/cmdline.txt
[[ $(</boot/cmdline.txt) =~ $tty ]] && sed -i "s/[[:blank:]]*console=${tty}[^\"[:blank:]]*//" /boot/cmdline.txt || sed -i "s/serial0/$tty/" /boot/cmdline.txt

fi
if [[ -f '/etc/systemd/system/getty.target.wants/serial-getty@serial0.service' ]]; then
Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-update
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ Do you wish to continue and update DietPi to v$COREVERSION_SERVER.$SUBVERSION_SE

#----------------------------------------------------------------
# Desktop run, exit key prompt
pgrep 'lxsession' &> /dev/null && read -p 'Press any key to exit DietPi-Update...'
pgrep 'lxsession' &> /dev/null && read -rp 'Press any key to exit DietPi-Update...'

fi
#----------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions dietpi/func/dietpi-globals
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
# - Assign defaults/code version as fallback
[[ $G_DIETPI_VERSION_CORE ]] || G_DIETPI_VERSION_CORE=6
[[ $G_DIETPI_VERSION_SUB ]] || G_DIETPI_VERSION_SUB=31
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=1
[[ $G_DIETPI_VERSION_RC ]] || G_DIETPI_VERSION_RC=2
[[ $G_GITBRANCH ]] || G_GITBRANCH='master'
[[ $G_GITOWNER ]] || G_GITOWNER='MichaIng'
# - Save current version and Git branch
Expand Down Expand Up @@ -1064,15 +1064,15 @@ $log_content" || break # Exit error handler menu loop on cancel
exit_code=$?
G_DIETPI-NOTIFY -1 $exit_code 'Alternative command execution |'
# Exit retry loop if alternative command succeeded, else stay in menu loop and wait for key press to allow reviewing alternative command output
[[ $exit_code == 0 ]] && break 2 || read -p 'Press any key to return to error handler menu...'
[[ $exit_code == 0 ]] && break 2 || read -rp 'Press any key to return to error handler menu...'

fi

# Attempt targeted solution, passed via $G_EXEC_ARRAY_TEXT[] and $G_EXEC_ARRAY_ACTION[${G_EXEC_ARRAY_TEXT[]}]
elif [[ $G_WHIP_RETURNED_VALUE ]]; then

${G_EXEC_ARRAY_ACTION[$G_WHIP_RETURNED_VALUE]}
read -p 'Press any key to return to error handler menu...'
read -rp 'Press any key to return to error handler menu...'

fi

Expand Down Expand Up @@ -1926,8 +1926,8 @@ $log_content" || break # Exit error handler menu loop on cancel
# Replace password string by asterisks in output string
if [[ $GCI_PASSWORD == 1 ]]; then

local password=$(sed -E "s/^.*$pattern[[:blank:]]*//" <<< "$setting_raw")
setting_raw="$(sed -E "s/(^.*$pattern[[:blank:]]*).*$/\1/" <<< "$setting_raw")${password//?/*}"
local password=$(sed -E "s/^.*${pattern}[[:blank:]]*//" <<< "$setting_raw")
setting_raw="$(sed -E "s/(^.*${pattern}[[:blank:]]*).*$/\1/" <<< "$setting_raw")${password//?/*}"
unset -v password

fi
Expand Down
10 changes: 5 additions & 5 deletions dietpi/func/dietpi-set_hardware
Original file line number Diff line number Diff line change
Expand Up @@ -1566,12 +1566,12 @@ Do you want to continue and DISABLE Bluetooth now?'; then
# - RPi
if (( $G_HW_MODEL < 10 )); then

sed -i "s/[[:blank:]]*console=$INPUT_ADDITIONAL[^\"[:blank:]]*//" /boot/cmdline.txt
sed -i "s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*//" /boot/cmdline.txt

# - Odroid C1/C2/XU4
elif (( $G_HW_MODEL < 12 )); then

sed -i "s/[[:blank:]]*console=$INPUT_ADDITIONAL[^\"[:blank:]]*//" /boot/boot.ini
sed -i "s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*//" /boot/boot.ini

elif (( $ARMBIAN )); then

Expand All @@ -1589,12 +1589,12 @@ Do you want to continue and DISABLE Bluetooth now?'; then
# - Pine A64: On ARMbian ttyS0 boot output is forced and custom console is not possible via armbianEnv.txt
elif (( $G_HW_MODEL == 40 )); then

sed -i "/^[[:blank:]]*console=$INPUT_ADDITIONAL[^\"[:blank:]]*$/d" $FP_UENV # New style: One variable each line
sed -i "s/[[:blank:]]*console=$INPUT_ADDITIONAL[^\"[:blank:]]*//" $FP_UENV # Old style: Multiple variables possible each line
sed -i "/^[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*$/d" $FP_UENV # New style: One variable each line
sed -i "s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*//" $FP_UENV # Old style: Multiple variables possible each line

#elif (( $G_HW_MODEL == 70 )); then

# sed -i "s/[[:blank:]]*console=$INPUT_ADDITIONAL[^\"[:blank:]]*//" $FP_UENV
# sed -i "s/[[:blank:]]*console=${INPUT_ADDITIONAL}[^\"[:blank:]]*//" $FP_UENV

fi

Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-set_software
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ _EOF_

# Remove from sudoers
[[ -f /etc/sudoers.d/$INPUT_MODE_VALUE ]] && rm /etc/sudoers.d/"$INPUT_MODE_VALUE"
sed -i "/^$INPUT_MODE_VALUE[[:blank:]]/d" /etc/sudoers.d/dietpi # pre-v6.29
sed -i "/^${INPUT_MODE_VALUE}[[:blank:]]/d" /etc/sudoers.d/dietpi # pre-v6.29

else

Expand Down
2 changes: 1 addition & 1 deletion dietpi/misc/dietpi-justboom
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Please select a soundcard via 'dietpi-config' or install ALSA, or ideally an aud
[[ $stream_result == 'closed' ]] && G_DIETPI-NOTIFY 1 'Detailed info is only available when audio is being played, play some music first!'

G_DIETPI-NOTIFY 0 'Completed, press any key to exit...\n'
read -p 'Press any key to exit...'
read -rp 'Press any key to exit...'

elif [[ $G_WHIP_RETURNED_VALUE == 'Subwoofer Mode' ]]; then

Expand Down
2 changes: 1 addition & 1 deletion dietpi/server_version-6
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
6
31
1
2
2 changes: 1 addition & 1 deletion rootfs/etc/bashrc.d/dietpi.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
fi

# Workaround if SSH client sets an unsupported $TERM string: https://github.com/MichaIng/DietPi/issues/2034
if [[ $SSH_TTY ]] && ! toe -a | grep -q "^$TERM[[:blank:]]"; then
if [[ $SSH_TTY ]] && ! toe -a | grep -q "^${TERM}[[:blank:]]"; then

TERM_old=$TERM
[[ $TERM == *'256'* ]] && export TERM='xterm-256color' || export TERM='xterm'
Expand Down
7 changes: 6 additions & 1 deletion rootfs/var/lib/dietpi/services/dietpi-firstboot.bash
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
# Apply language (locale)
local autoinstall_language=$(sed -n '/^[[:blank:]]*AUTO_SETUP_LOCALE=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)
grep -q "^$autoinstall_language UTF-8$" /usr/share/i18n/SUPPORTED || autoinstall_language='C.UTF-8'
if ! locale | grep -qE "(LANG|LC_ALL)=[\'\"]?$autoinstall_language[\'\"]?" || ! locale -a | grep -qiE 'C\.UTF-?8'; then
if ! locale | grep -qE "(LANG|LC_ALL)=[\'\"]?${autoinstall_language}[\'\"]?" || ! locale -a | grep -qiE 'C\.UTF-?8'; then

G_DIETPI-NOTIFY 2 "Setting locale $autoinstall_language. Please wait..."
/boot/dietpi/func/dietpi-set_software locale "$autoinstall_language"
Expand Down Expand Up @@ -289,6 +289,11 @@
#/////////////////////////////////////////////////////////////////////////////////////
# Main Loop
#/////////////////////////////////////////////////////////////////////////////////////

# Failsafe: https://github.com/MichaIng/DietPi/issues/3646#issuecomment-653739919
chown root:root /
chmod 755 /

# Apply dietpi.txt settings, device specific workarounds and reset hardware ID + SSH host keys
Apply_DietPi_FirstRun_Settings

Expand Down

0 comments on commit 01ad51a

Please sign in to comment.