X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsite_avenger%2Frevamp_cakelampvm.sh;h=96daae907e2dd4b753ed65f4bdca2d25ad735aa3;hb=0429ffb00a3f48ad1a6cb987d483609fe76c1a97;hp=fba7bb60bbb257e76ddecb6db13a1fad9a3b4186;hpb=f8c8e666cc22c5cc3a18311ee8f534becfa23ca7;p=feisty_meow.git diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index fba7bb60..96daae90 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -243,12 +243,21 @@ sep pattern="[#;][[:blank:]]*read only = yes" replacement="read only = no" -# we just always do the replacement now, after realizing the sentinel pattern -# was actually already in the file... too much subtlety can get one into trouble. +# we just always do the replacement now rather than making it conditional, +# after realizing the sentinel pattern was actually already in the file... +# too much subtlety can get one into trouble. sed -i "0,/$pattern/{s/$pattern/$replacement/}" /etc/samba/smb.conf test_or_die "patching samba configuration to enable write acccess on user home dirs" echo successfully patched the samba configuration to enable writes on user home directories. +# add in a disabling of the archive bit mapping feature, which hoses up the execute bit +# in an attempt to save the sad old DOS archive bit across the samba connection. +grep -q "map archive" /etc/samba/smb.conf +# if the phrase wasn't found, we need to add it. +if [ $? -ne 0 ]; then + sed -i "/\[global\]/[global]\n\nmap archive = no" /etc/samba/smb.conf +fi + # sweet, looks like that worked... restart_samba