remove VPS cruft
This commit is contained in:
parent
34fb53e8cc
commit
8d31a6226a
|
@ -0,0 +1,3 @@
|
|||
dist/*
|
||||
propellor
|
||||
tags
|
|
@ -64,4 +64,7 @@ cleanCloudAtCost hostname = propertyList "cloudatcost cleanup"
|
|||
, "/etc/default/grub" `File.containsLine` "GRUB_DISABLE_LINUX_UUID=true"
|
||||
`onChange` cmdProperty "update-grub" []
|
||||
`onChange` cmdProperty "update-initramfs" [Param "-u"]
|
||||
-- Cruft
|
||||
, File.notPresent "/etc/rc.local"
|
||||
, File.notPresent "/etc/init.d/S97-setup.sh"
|
||||
]
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
module Property.File where
|
||||
|
||||
import System.Directory
|
||||
|
||||
import Property
|
||||
import Utility.Directory
|
||||
|
||||
{- Replaces all the content of a file. -}
|
||||
hasContent :: FilePath -> [Line] -> Property
|
||||
|
@ -20,3 +23,8 @@ f `containsLine` l = FileProperty (f ++ " contains:" ++ l) f go
|
|||
- file will be written. -}
|
||||
lacksLine :: FilePath -> Line -> Property
|
||||
f `lacksLine` l = FileProperty (f ++ " remove: " ++ l) f (filter (/= l))
|
||||
|
||||
{- Note: Does not remove symlinks or non-plain-files. -}
|
||||
notPresent :: FilePath -> Property
|
||||
notPresent f = check (doesFileExist f) $ IOProperty (f ++ " not present") $
|
||||
makeChange $ nukeFile f
|
||||
|
|
Loading…
Reference in New Issue