From 5ae6a302df5c7bd71cd5dadb53e5bb5e710762b3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 5 Dec 2014 17:44:09 -0400 Subject: some comments --- src/Propellor/Property/OS.hs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/OS.hs b/src/Propellor/Property/OS.hs index 020d7435..22414bb6 100644 --- a/src/Propellor/Property/OS.hs +++ b/src/Propellor/Property/OS.hs @@ -77,12 +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 $ -- 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. @@ -175,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 -- cgit v1.2.3