Modify `/etc/fstab` settings and misc setting.
This commit is contained in:
parent
8b4b0eeb9e
commit
94420844b0
|
@ -8,12 +8,18 @@ package 'cifs-utils'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
directory '/var/spool/apt-mirror' do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '777'
|
||||||
|
end
|
||||||
|
|
||||||
# Add the fstab entry:
|
# Add the fstab entry:
|
||||||
file '/etc/fstab' do
|
file '/etc/fstab' do
|
||||||
action :edit
|
action :edit
|
||||||
|
|
||||||
block do |content|
|
block do |content|
|
||||||
content << "//192.168.10.200/Shared/shared /mnt/shared cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,defaults 0 0\n"
|
content << "//192.168.10.200/Shared/AppData /mnt/shared cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,vers=3.0,_netdev 0 0\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
not_if 'grep shared /etc/fstab'
|
not_if 'grep shared /etc/fstab'
|
||||||
|
@ -23,12 +29,32 @@ file '/etc/fstab' do
|
||||||
action :edit
|
action :edit
|
||||||
|
|
||||||
block do |content|
|
block do |content|
|
||||||
content << "//192.168.10.200/homes/kazu634/Drive/Moments /mnt/img cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,defaults 0 0\n"
|
content << "//192.168.10.200/homes/kazu634/Drive/Moments /mnt/img cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,vers=3.0,_netdev 0 0\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
not_if 'grep img /etc/fstab'
|
not_if 'grep img /etc/fstab'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
file '/etc/fstab' do
|
||||||
|
action :edit
|
||||||
|
|
||||||
|
block do |content|
|
||||||
|
content << "//192.168.10.200/Shared/AppData /mnt/backup cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,vers=3.0,_netdev 0 0\n"
|
||||||
|
end
|
||||||
|
|
||||||
|
not_if 'grep backup /etc/fstab'
|
||||||
|
end
|
||||||
|
|
||||||
|
file '/etc/fstab' do
|
||||||
|
action :edit
|
||||||
|
|
||||||
|
block do |content|
|
||||||
|
content << "//192.168.10.200/Shared/PXEBoot/www/ubuntu/apt-mirror /var/spool/apt-mirror cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,vers=3.0,_netdev 0 0\n"
|
||||||
|
end
|
||||||
|
|
||||||
|
not_if 'grep apt-mirror /etc/fstab'
|
||||||
|
end
|
||||||
|
|
||||||
execute 'mount -a' do
|
execute 'mount -a' do
|
||||||
not_if 'df -h | grep shared'
|
not_if 'df -h | grep shared'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue