post_install_sid: Add 'util-linux' package and ensure to enable TRIM in '/etc/rc.local' if a SSD is available.

This commit is contained in:
gardouille 2015-11-23 14:09:00 +01:00
parent f1965f9d7c
commit 910006dbce
3 changed files with 21 additions and 1 deletions

View File

@ -6,10 +6,12 @@
#### Packages
##### Add
* gpicview: Lightweight image viewer.
* util-linux: Miscellaneous system utilities.
* xautolock: Program launcher for idle X session.
##### Change
* Ensure to have an xautolock launch at boot time (in ~/.xinitrc).
* Fstrim: Ensure to enable TRIM in '/etc/rc.local' if a SSD is available.
### 0.3.1

View File

@ -218,6 +218,7 @@ pastebinit - < <(ls -al /dev)
* sudo: Provide limited super user privileges to specific users.
* tcpdump: Command-line network traffic analyzer.
* tree: Displays an indented directory tree,in color.
* util-linux: Miscellaneous system utilities.
* whois: Intelligent WHOIS client.
##### Post-Configuration
@ -232,6 +233,8 @@ pastebinit - < <(ls -al /dev)
* Restart the NTP service.
* Rsyslog: Display rsyslog in tty9.
* Sudo: Add default user to the sudo group
* Fstrim: Ensure to enable TRIM in '/etc/rc.local' if a SSD is available.
* See http://links.gardouille.fr/?ozlKFg for more informations.
#### System tools for cli

View File

@ -524,7 +524,7 @@ ains "Dev tools" build-essential binutils cpp debconf-utils gcc g++ make
preconfig hddtemp
##### Installation
ains "Admin tools for cli" acpitool alien apticron apt-file apt-listbugs apt-rdepends apt-show-source apt-show-versions dctrl-tools debian-goodies dnsutils ethtool git git-svn gpm hddtemp htop ifscheme iperf mlocate mercurial module-assistant ncdu netdiscover netselect-apt nmap ntp parted pastebinit rsyslog sudo sysv-rc-conf tcpdump tree whois
ains "Admin tools for cli" acpitool alien apticron apt-file apt-listbugs apt-rdepends apt-show-source apt-show-versions dctrl-tools debian-goodies dnsutils ethtool git git-svn gpm hddtemp htop ifscheme iperf mlocate mercurial module-assistant ncdu netdiscover netselect-apt nmap ntp parted pastebinit rsyslog sudo sysv-rc-conf tcpdump tree util-linux whois
##### Post-configuration
###### apt-file: Synchronize the package contents from their sources.
@ -559,6 +559,21 @@ sed -i 's/tty8/tty9/' /etc/rsyslog.conf
if [ ! "$(grep "^sudo:x:27:.*${new_username}" /etc/group)" ]; then
adduser ${new_username} sudo
fi
###### Fstrim: Ensure to enable TRIM if a SSD is available.
# If fstrim is not already enable
if [ ! "$(grep fstrim /etc/rc.local)" ]; then
# For all hdd
for path_drive in $(find /sys/block/ ! -name "dm-*" -type l);
do
IS_SSD=$(grep 0 ${path_drive}/queue/rotational)
if [ ${IS_SSD} ]; then
sed -i 's/\(^exit 0\)/# Run TRIM on every mountpath\nfstrim -a\n\n\1/' /etc/rc.local
fi
done
fi
###########################################################
###########################################################