Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # To link:
- # chmod +x link.sh
- # sudo ./link.sh
- my_etc=$HOME/myconfig/Y540/etc
- files=(
- modprobe.d/blacklist.conf
- # X11/xorg.conf.d/50-touchpad.conf
- # X11/xorg.conf.d/60-keyboard.conf
- # X11/xorg.conf.d/90-nvidia.conf
- )
- for file in "${files[@]}"
- do
- source=$my_etc/$file
- target=/etc/$file
- echo Unlinking "$target" ...
- ln -sf -- "$source" "$target"
- # unlink "$target"
- echo Linking "$source" to "$target"
- ln -s "$source" "$target"
- done
- YIELDS:
- [milos@milos etc]$ sudo ./link.sh
- Unlinking /etc/modprobe.d/blacklist.conf ...
- Linking /root/myconfig/Y540/etc/modprobe.d/blacklist.conf to /etc/modprobe.d/blacklist.conf
- ln: failed to create symbolic link '/etc/modprobe.d/blacklist.conf': File exists
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement