tweaks
This commit is contained in:
parent
1dcaeb6f77
commit
4e442f4bcf
13
Propellor.hs
13
Propellor.hs
|
@ -61,16 +61,15 @@ standardSystem suite = propertyList "standard system"
|
||||||
-- Clean up a system as installed by cloudatcost.com
|
-- Clean up a system as installed by cloudatcost.com
|
||||||
cleanCloudAtCost :: HostName -> Property
|
cleanCloudAtCost :: HostName -> Property
|
||||||
cleanCloudAtCost hostname = propertyList "cloudatcost cleanup"
|
cleanCloudAtCost hostname = propertyList "cloudatcost cleanup"
|
||||||
[ User.nuked "user"
|
[ Hostname.set hostname
|
||||||
, Hostname.set hostname
|
|
||||||
, Ssh.uniqueHostKeys
|
, Ssh.uniqueHostKeys
|
||||||
, "worked around grub/lvm boot bug #743126" ==>
|
, "worked around grub/lvm boot bug #743126" ==>
|
||||||
"/etc/default/grub" `File.containsLine` "GRUB_DISABLE_LINUX_UUID=true"
|
"/etc/default/grub" `File.containsLine` "GRUB_DISABLE_LINUX_UUID=true"
|
||||||
`onChange` cmdProperty "update-grub" []
|
`onChange` cmdProperty "update-grub" []
|
||||||
`onChange` cmdProperty "update-initramfs" [Param "-u"]
|
`onChange` cmdProperty "update-initramfs" [Param "-u"]
|
||||||
, "nuked cloudatcost cruft" ==>
|
, "nuked cloudatcost cruft" ==> combineProperties
|
||||||
combineProperties
|
[ File.notPresent "/etc/rc.local"
|
||||||
[ File.notPresent "/etc/rc.local"
|
, File.notPresent "/etc/init.d/S97-setup.sh"
|
||||||
, File.notPresent "/etc/init.d/S97-setup.sh"
|
, User.nuked "user" User.YesReallyDeleteHome
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,6 +6,8 @@ import Common
|
||||||
|
|
||||||
type UserName = String
|
type UserName = String
|
||||||
|
|
||||||
|
data Eep = YesReallyDeleteHome
|
||||||
|
|
||||||
sshAccountFor :: UserName -> Property
|
sshAccountFor :: UserName -> Property
|
||||||
sshAccountFor user = check (isNothing <$> homedir user) $ cmdProperty "adduser"
|
sshAccountFor user = check (isNothing <$> homedir user) $ cmdProperty "adduser"
|
||||||
[ Param "--disabled-password"
|
[ Param "--disabled-password"
|
||||||
|
@ -15,8 +17,8 @@ sshAccountFor user = check (isNothing <$> homedir user) $ cmdProperty "adduser"
|
||||||
`describe` ("ssh account " ++ user)
|
`describe` ("ssh account " ++ user)
|
||||||
|
|
||||||
{- Removes user home directory!! Use with caution. -}
|
{- Removes user home directory!! Use with caution. -}
|
||||||
nuked :: UserName -> Property
|
nuked :: UserName -> Eep -> Property
|
||||||
nuked user = check (isJust <$> homedir user) $ cmdProperty "userdel"
|
nuked user _ = check (isJust <$> homedir user) $ cmdProperty "userdel"
|
||||||
[ Param "-r"
|
[ Param "-r"
|
||||||
, Param user
|
, Param user
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue