added some bashism to automountctl

This commit is contained in:
Tobias Kessels
2018-12-18 11:43:10 +01:00
parent f763dddca7
commit 0f4a0e8d78

View File

@@ -28,29 +28,29 @@ fi
case ${command} in case ${command} in
on) on)
echo "turning on" echo "turning on"
if [ $mate -eq "1" ] ; then if [[ $mate -eq "1" ]] ; then
gsettings set org.mate.media-handling automount true gsettings set org.mate.media-handling automount true
gsettings set org.mate.media-handling automount-open true gsettings set org.mate.media-handling automount-open true
fi fi
if [ $gnome -eq "1" ] ; then if [[ $gnome -eq "1" ]] ; then
gsettings set org.gnome.desktop.media-handling automount true gsettings set org.gnome.desktop.media-handling automount true
gsettings set org.gnome.desktop.media-handling automount-open true gsettings set org.gnome.desktop.media-handling automount-open true
fi fi
;; ;;
off) off)
echo "turning off" echo "turning off"
if [ $mate -eq "1" ] ; then if [[ $mate -eq "1" ]] ; then
gsettings set org.mate.media-handling automount false gsettings set org.mate.media-handling automount false
gsettings set org.mate.media-handling automount-open false gsettings set org.mate.media-handling automount-open false
fi fi
if [ $gnome -eq "1" ] ; then if [[ $gnome -eq "1" ]] ; then
gsettings set org.gnome.desktop.media-handling automount false gsettings set org.gnome.desktop.media-handling automount false
gsettings set org.gnome.desktop.media-handling automount-open false gsettings set org.gnome.desktop.media-handling automount-open false
fi fi
;; ;;
*) *)
echo "Status:" echo "Status:"
if [ $mate -eq "1" ] ; then if [[ $mate -eq "1" ]] ; then
echo "# mate-settings found:" echo "# mate-settings found:"
echo " - org.mate.media-handling automount :" echo " - org.mate.media-handling automount :"
echo -n " " echo -n " "
@@ -60,7 +60,7 @@ off)
gsettings get org.mate.media-handling automount-open gsettings get org.mate.media-handling automount-open
fi fi
if [ $gnome -eq "1" ] ; then if [[ $gnome -eq "1" ]] ; then
echo "# gnome-settings found:" echo "# gnome-settings found:"
echo " - org.gnome.desktop.media-handling automount :" echo " - org.gnome.desktop.media-handling automount :"
echo -n " " echo -n " "