quoted all paths to prevent globbing errors

This commit is contained in:
Asif Bacchus 2019-01-09 02:16:26 -07:00
parent 449ca4bb32
commit f79477643c

View File

@ -65,54 +65,54 @@ echo "(please note any errors below)"
## copy clean .bashrc for root user ## copy clean .bashrc for root user
echo -e "copying ${yellow}.bashrc${norm} to ${yellow}${path}/root${norm}" echo -e "copying ${yellow}.bashrc${norm} to ${yellow}${path}/root${norm}"
# backup # backup
cp -f /root/.bashrc ${path}/root/.bashrc.original cp -f /root/.bashrc "${path}/root/.bashrc.original"
# copy new # copy new
cp -f config/root/.bashrc ${path}/root/.bashrc cp -f config/root/.bashrc "${path}/root/.bashrc"
## copy profile template file ## copy profile template file
echo -e "copying ${yellow}profile${norm} to ${yellow}${path}/etc/profile${norm}" echo -e "copying ${yellow}profile${norm} to ${yellow}${path}/etc/profile${norm}"
# backup # backup
cp -f /etc/profile ${path}/etc/profile.original cp -f /etc/profile "${path}/etc/profile.original"
# copy new # copy new
cp -f config/etc/profile ${path}/etc/profile cp -f config/etc/profile "${path}/etc/profile"
## copy updated bash.bashrc ## copy updated bash.bashrc
echo -e "copying ${yellow}bash.bashrc${norm} to ${yellow}${path}/etc/bash.bashrc${norm}" echo -e "copying ${yellow}bash.bashrc${norm} to ${yellow}${path}/etc/bash.bashrc${norm}"
# backup # backup
cp -f /etc/bash.bashrc ${path}/etc/bash.bashrc.original cp -f /etc/bash.bashrc "${path}/etc/bash.bashrc.original"
# copy new # copy new
cp -f config/etc/bash.bashrc ${path}/etc/bash.bashrc cp -f config/etc/bash.bashrc "${path}/etc/bash.bashrc"
## copy updated skel .bashrc ## copy updated skel .bashrc
echo -e "copying ${yellow}.bashrc${norm} to ${yellow}${path}/etc/skel/.bashrc${norm}" echo -e "copying ${yellow}.bashrc${norm} to ${yellow}${path}/etc/skel/.bashrc${norm}"
# backup # backup
cp -f /etc/skel/.bashrc ${path}/etc/skel/.bashrc.original cp -f /etc/skel/.bashrc "${path}/etc/skel/.bashrc.original"
# copy new # copy new
cp -f config/etc/skel/.bashrc ${path}/etc/skel/.bashrc cp -f config/etc/skel/.bashrc "${path}/etc/skel/.bashrc"
## copy nano settings ## copy nano settings
echo -e "\ncopying ${yellow}nanorc${norm} to ${yellow}${path}/etc/nanorc${norm}" echo -e "\ncopying ${yellow}nanorc${norm} to ${yellow}${path}/etc/nanorc${norm}"
# backup # backup
cp -f /etc/nanorc ${path}/etc/nanorc.original cp -f /etc/nanorc "${path}/etc/nanorc.original"
# copy new # copy new
cp -f config/etc/nanorc ${path}/etc/nanorc cp -f config/etc/nanorc "${path}/etc/nanorc"
## copy timesync ## copy timesync
echo -e "\ncopying ${yellow}timesyncd.conf${norm} to ${yellow}${path}/etc/systemd/timesyncd.conf${norm}" echo -e "\ncopying ${yellow}timesyncd.conf${norm} to ${yellow}${path}/etc/systemd/timesyncd.conf${norm}"
# backup # backup
cp -f /etc/systemd/timesyncd.conf ${path}/etc/systemd/timesyncd.conf.original cp -f /etc/systemd/timesyncd.conf "${path}/etc/systemd/timesyncd.conf.original"
# copy new # copy new
cp -f config/etc/systemd/timesyncd.conf ${path}/etc/systemd/timesyncd.conf cp -f config/etc/systemd/timesyncd.conf "${path}/etc/systemd/timesyncd.conf"
## copy sshd configuration ## copy sshd configuration
echo -e "\ncopying ${yellow}sshd_config${norm} to ${yellow}${path}/etc/ssh/sshd_config${norm}" echo -e "\ncopying ${yellow}sshd_config${norm} to ${yellow}${path}/etc/ssh/sshd_config${norm}"
# backup # backup
cp -f /etc/ssh/sshd_config ${path}/etc/ssh/sshd_config.original cp -f /etc/ssh/sshd_config "${path}/etc/ssh/sshd_config.original"
# copy new # copy new
cp -f config/etc/ssh/sshd_config ${path}/etc/ssh/sshd_config cp -f config/etc/ssh/sshd_config "${path}/etc/ssh/sshd_config"
### Exit gracefully ### Exit gracefully