diff options
| author | Joey Hess <id@joeyh.name> | 2014-12-05 17:44:14 -0400 |
|---|---|---|
| committer | Joey Hess <id@joeyh.name> | 2014-12-05 17:44:14 -0400 |
| commit | 9805f132ac6440bb8c2ca5957101db2cb59428c7 (patch) | |
| tree | f3f5a4aa009bc573b800cee89118afba00981101 /src/Propellor/Property/OS.hs | |
| parent | dbc76b1e5225a28b84efa14659ff1c0c1d5fc463 (diff) | |
| parent | 5ae6a302df5c7bd71cd5dadb53e5bb5e710762b3 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/OS.hs')
| -rw-r--r-- | src/Propellor/Property/OS.hs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Propellor/Property/OS.hs b/src/Propellor/Property/OS.hs index 30f8c4bb..22414bb6 100644 --- a/src/Propellor/Property/OS.hs +++ b/src/Propellor/Property/OS.hs @@ -45,8 +45,7 @@ import Control.Exception (throw) -- > & os (System (Debian Unstable) "amd64") -- > & cleanInstallOnce (Confirmed "foo.example.com") -- > `onChange` propertyList "fixing up after clean install" --- > [ User.shadowConfig True --- > , preserveNetworkInterfaces +-- > [ preserveNetworkInterfaces -- > , preserveResolvConf -- > , preserverRootSshAuthorized -- > , Apt.update @@ -78,9 +77,19 @@ cleanInstallOnce confirmation = check (not <$> doesFileExist flagfile) $ (Just d@(System (Debian _) _)) -> debootstrap d (Just u@(System (Ubuntu _) _)) -> debootstrap u _ -> error "os is not declared to be Debian or Ubuntu" - debootstrap targetos = ensureProperty $ toProp $ - Debootstrap.built newOSDir targetos Debootstrap.DefaultConfig + debootstrap targetos = ensureProperty $ toProp $ + -- Ignore the os setting, and install debootstrap from + -- source, since we don't know what OS we're running in yet. + Debootstrap.built' Debootstrap.sourceInstall + newOSDir targetos Debootstrap.DefaultConfig + -- debootstrap, I wish it was faster.. + -- TODO eatmydata to speed it up + -- Problem: Installing eatmydata on some random OS like + -- Fedora may be difficult. Maybe configure dpkg to not + -- sync instead? + + -- This is the fun bit. flipped = property (newOSDir ++ " moved into place") $ liftIO $ do -- First, unmount most mount points, lazily, so -- they don't interfere with moving things around. @@ -173,7 +182,7 @@ confirmed desc (Confirmed c) = property desc $ do -- | /etc/network/interfaces is configured to bring up all interfaces that -- are currently up, using the same IP addresses. preserveNetworkInterfaces :: Property -preserveNetworkInterfaces = undefined +preserveNetworkInterfaces = undefined -- TODO -- | /etc/resolv.conf is copied the from the old OS preserveResolvConf :: Property |
