Use long-format for options
This commit is contained in:
parent
bfc1660c68
commit
b89daa4f3c
|
@ -16,8 +16,8 @@ systemctl restart sshd
|
|||
|
||||
# set timezone
|
||||
echo "Europe/Paris" > /etc/timezone
|
||||
rm -f -- /etc/localtime
|
||||
dpkg-reconfigure -f noninteractive tzdata
|
||||
rm --force -- /etc/localtime
|
||||
dpkg-reconfigure --frontend noninteractive -- tzdata
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -33,7 +33,7 @@ export LC_ALL="${NEW_L}"
|
|||
sed -i -e "s/# \(${NEW_L} UTF-8\)/\1/" /etc/locale.gen
|
||||
locale-gen
|
||||
echo "LANG=\"${NEW_L}\"" > /etc/default/locale
|
||||
dpkg-reconfigure -f noninteractive locales
|
||||
dpkg-reconfigure --frontend noninteractive -- locales
|
||||
update-locale LANG="${NEW_L}"
|
||||
|
||||
# }}}
|
||||
|
@ -41,10 +41,10 @@ update-locale LANG="${NEW_L}"
|
|||
# download an additionnal script to manage rsyslog and logrotate {{{
|
||||
|
||||
# Previously used hostnamectl but it can't works correctly on LXC container with Apparmor
|
||||
debian_version=$(grep VERSION_CODENAME /etc/os-release | cut -d"=" -f2)
|
||||
debian_version=$(grep VERSION_CODENAME /etc/os-release | cut --delimiter="=" --fields=2)
|
||||
|
||||
wget https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/raw/master/scripts/latecommand.tar.gz -O /tmp/latecommand.tar.gz
|
||||
tar xzf /tmp/latecommand.tar.gz -C /tmp/
|
||||
wget https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/raw/master/scripts/latecommand.tar.gz --output-document=/tmp/latecommand.tar.gz
|
||||
tar xzf /tmp/latecommand.tar.gz --directory=/tmp/
|
||||
/bin/sh /tmp/latecommand/post."${debian_version}".sh
|
||||
|
||||
# }}}
|
||||
|
@ -53,7 +53,7 @@ tar xzf /tmp/latecommand.tar.gz -C /tmp/
|
|||
|
||||
## Clean downloaded and list of packages
|
||||
aptitude clean
|
||||
rm -f /var/cache/apt/*.bin
|
||||
rm --force -- /var/cache/apt/*.bin
|
||||
|
||||
# }}}
|
||||
|
||||
|
@ -61,8 +61,8 @@ rm -f /var/cache/apt/*.bin
|
|||
true > /etc/resolv.conf
|
||||
find /var/log -type f -iname "*.log" -delete -exec touch {} \;
|
||||
find /var/log -type f \( -iname "*.gz" -o -iname ".*.0" -o -iname "dmesg.*" \) -delete
|
||||
rm -f -- /root/.bash_history
|
||||
rm -rf -- /var/log/journal/*
|
||||
rm --force -- /root/.bash_history
|
||||
rm --recursive --force -- /var/log/journal/*
|
||||
|
||||
# }}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue