mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 22:34:11 +02:00
Update ha_entrypoint_modif.sh
This commit is contained in:
@@ -5,24 +5,6 @@ set -e
|
|||||||
# Global modifications before entrypoint #
|
# Global modifications before entrypoint #
|
||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
# Ensure lf
|
|
||||||
###########
|
|
||||||
|
|
||||||
# This script recursively applies dos2unix to all files in /etc
|
|
||||||
# It skips hidden files, binary files, and files without crlf eol
|
|
||||||
|
|
||||||
# Find all non-hidden files in /etc that contain crlf eol
|
|
||||||
FILES=$(find /etc /defaults -type f -not -path '*/\.*' -exec grep -Il $'\r' {} \;)
|
|
||||||
|
|
||||||
# Loop through each file and apply dos2unix
|
|
||||||
for f in $FILES; do
|
|
||||||
# Check if the file is a text file
|
|
||||||
if file "$f" | grep -q text; then
|
|
||||||
# Apply dos2unix and keep the original timestamp
|
|
||||||
dos2unix -k "$f"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Corrects permissions for s6 v3
|
# Corrects permissions for s6 v3
|
||||||
################################
|
################################
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user