misc changes
This commit is contained in:
parent
d30c447930
commit
8dfa3c474b
3 changed files with 15 additions and 24 deletions
|
@ -334,7 +334,7 @@ function installPackage () {
|
||||||
#
|
#
|
||||||
# check dependency and install it if necessary
|
# check dependency and install it if necessary
|
||||||
# input : package manager, package name
|
# input : package manager, package name
|
||||||
#
|
#FIXME:
|
||||||
function checkAndInstallDep () {
|
function checkAndInstallDep () {
|
||||||
if ! which $2 >/dev/null; then
|
if ! which $2 >/dev/null; then
|
||||||
printf "[DEP] check dependency : $2 [ ""$BOLDROUGE""!!"$NORMAL" ]\n"
|
printf "[DEP] check dependency : $2 [ ""$BOLDROUGE""!!"$NORMAL" ]\n"
|
||||||
|
|
|
@ -978,25 +978,18 @@ function enableUFW () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#TODO:
|
#
|
||||||
|
# enable numlock by default on LightDM
|
||||||
|
#
|
||||||
function enableNumLockX () {
|
function enableNumLockX () {
|
||||||
msg "Adding NumLockX to MDM/LightDM Default Init"
|
msg "Adding NumLockX to MDM/LightDM Default Init"
|
||||||
|
|
||||||
|
#FIXME:
|
||||||
checkAndInstallDep apt numlockx
|
checkAndInstallDep apt numlockx
|
||||||
|
|
||||||
if which mdm >/dev/null; then
|
if which lightdm >/dev/null; then
|
||||||
sudo cp /etc/mdm/Init/Default /etc/mdm/Init/Default.yggbak
|
|
||||||
sudo sed -i -e '
|
|
||||||
s!exit 0!#numlockx!
|
|
||||||
' /etc/mdm/Init/Default
|
|
||||||
sudo sh -c "echo 'if [ -x /usr/bin/numlockx ]; then\n\
|
|
||||||
exec /usr/bin/numlockx on\n\
|
|
||||||
fi\n\
|
|
||||||
\n\
|
|
||||||
exit 0' >> /etc/mdm/Init/Default"
|
|
||||||
elif which lightdm >/dev/null; then
|
|
||||||
sudo cp /etc/lightdm/lightdm.conf.d/70-linuxmint.conf /etc/lightdm/lightdm.conf.d/70-linuxmint.conf.yggbak
|
sudo cp /etc/lightdm/lightdm.conf.d/70-linuxmint.conf /etc/lightdm/lightdm.conf.d/70-linuxmint.conf.yggbak
|
||||||
sudo bash -c "echo 'greeter-setup-script=/usr/bin/numlockx on' >> /etc/lightdm/lightdm.conf.d/70-linuxmint.conf"
|
echo "greeter-setup-script=/usr/bin/numlockx on" | sudo tee -a /etc/lightdm/lightdm.conf.d/70-linuxmint.conf
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1004,10 +997,11 @@ function enableNumLockX () {
|
||||||
# /tmp in RAM by modifying /etc/fstab
|
# /tmp in RAM by modifying /etc/fstab
|
||||||
#
|
#
|
||||||
function enableTmpRAM () {
|
function enableTmpRAM () {
|
||||||
msg "Enable /tmp in RAM by modifying /etc/fstab"
|
msg "Enabling /tmp in RAM by modifying /etc/fstab"
|
||||||
runCmd "echo 'tmpfs /tmp tmpfs defaults,size=2g 0 0' | sudo tee -a /etc/fstab"
|
runCmd "echo 'tmpfs /tmp tmpfs defaults,size=2g 0 0' | sudo tee -a /etc/fstab"
|
||||||
printf "[INFO] Reboot required"
|
if (whiptail --title "/tmp in RAM - Reboot" --yesno "Reboot required, proceed now ?" 10 60) then
|
||||||
printf "\n"
|
sudo reboot
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1024,7 +1018,7 @@ function addScreenfetchBashrc () {
|
||||||
|
|
||||||
#
|
#
|
||||||
# cli history cmd timestamp enable
|
# cli history cmd timestamp enable
|
||||||
#TODO:
|
#FIXME:
|
||||||
function enableHistoryTS () {
|
function enableHistoryTS () {
|
||||||
typeset ret_code
|
typeset ret_code
|
||||||
printf "CLI History TimeStamp enabling "
|
printf "CLI History TimeStamp enabling "
|
||||||
|
@ -1073,14 +1067,13 @@ function toolOptimizeFirefox () {
|
||||||
printf "Optimizing Firefox"
|
printf "Optimizing Firefox"
|
||||||
pkill -9 firefox
|
pkill -9 firefox
|
||||||
for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM; REINDEX;'; done
|
for f in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM; REINDEX;'; done
|
||||||
|
printf "\n"
|
||||||
fi
|
fi
|
||||||
if which firefox-trunk >/dev/null; then
|
if which firefox-trunk >/dev/null; then
|
||||||
printf "Optimizing Firefox Nightly"
|
printf "Optimizing Firefox Nightly"
|
||||||
pkill -9 firefox-trunk
|
pkill -9 firefox-trunk
|
||||||
for f in ~/.mozilla/firefox-trunk/*/*.sqlite; do sqlite3 $f 'VACUUM; REINDEX;'; done
|
for f in ~/.mozilla/firefox-trunk/*/*.sqlite; do sqlite3 $f 'VACUUM; REINDEX;'; done
|
||||||
fi
|
printf "\n"
|
||||||
if (whiptail --title "Firefox SQLite DB Optimization - Reboot" --yesno "Reboot required, proceed now ?" 10 60) then
|
|
||||||
sudo reboot
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,13 +41,11 @@ echo "--[ Yggdrasil log ]--[ "$cDate" ]--[ "$cTime" ]-----------------------" >>
|
||||||
while getopts ":h,v,f,c,t,u" option; do
|
while getopts ":h,v,f,c,t,u" option; do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
t) #test purpose only
|
t) #test purpose only
|
||||||
installNightly
|
|
||||||
installBeta
|
|
||||||
installBase
|
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
f) # install all apps
|
f) # install all apps
|
||||||
#TODO:
|
#TODO:
|
||||||
|
updateSystem
|
||||||
addRequiredPPA
|
addRequiredPPA
|
||||||
msg "Installing all Apps"
|
msg "Installing all Apps"
|
||||||
installBase
|
installBase
|
||||||
|
|
Loading…
Reference in a new issue