mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
drops uniqueness requirement (#236)
This commit is contained in:
committed by
GitHub
parent
894fa21002
commit
91557c39e5
@@ -125,6 +125,7 @@ sync_0_2_9 = Synchronizer
|
|||||||
, syncConvertEcdsaCerts
|
, syncConvertEcdsaCerts
|
||||||
, syncRestarterService
|
, syncRestarterService
|
||||||
, syncInstallEject
|
, syncInstallEject
|
||||||
|
, syncDropCertificateUniqueness
|
||||||
]
|
]
|
||||||
|
|
||||||
syncCreateAgentTmp :: SyncOp
|
syncCreateAgentTmp :: SyncOp
|
||||||
@@ -595,6 +596,20 @@ syncUpgradeTor = SyncOp "Install Tor 0.3.5.12-1" check migrate False
|
|||||||
shell "apt-get update"
|
shell "apt-get update"
|
||||||
shell "apt-get install -y tor=0.3.5.12-1"
|
shell "apt-get install -y tor=0.3.5.12-1"
|
||||||
|
|
||||||
|
syncDropCertificateUniqueness :: SyncOp
|
||||||
|
syncDropCertificateUniqueness = SyncOp "Eliminate OpenSSL unique_subject=yes" check migrate False
|
||||||
|
where
|
||||||
|
uni = "unique_subject = no\n"
|
||||||
|
check = do
|
||||||
|
base <- asks $ appFilesystemBase . appSettings
|
||||||
|
contentsRoot <- liftIO . BS.readFile . toS $ (rootCaDirectory <> "index.txt.attr") `relativeTo` base
|
||||||
|
contentsInt <- liftIO . BS.readFile . toS $ (intermediateCaDirectory <> "index.txt.attr") `relativeTo` base
|
||||||
|
pure $ uni /= contentsRoot || uni /= contentsInt
|
||||||
|
migrate = do
|
||||||
|
base <- asks $ appFilesystemBase . appSettings
|
||||||
|
liftIO $ BS.writeFile (toS $ (rootCaDirectory <> "index.txt.attr") `relativeTo` base) uni
|
||||||
|
liftIO $ BS.writeFile (toS $ (intermediateCaDirectory <> "index.txt.attr") `relativeTo` base) uni
|
||||||
|
|
||||||
failUpdate :: S9Error -> ExceptT Void (ReaderT AgentCtx IO) ()
|
failUpdate :: S9Error -> ExceptT Void (ReaderT AgentCtx IO) ()
|
||||||
failUpdate e = do
|
failUpdate e = do
|
||||||
ref <- asks appIsUpdateFailed
|
ref <- asks appIsUpdateFailed
|
||||||
|
|||||||
Reference in New Issue
Block a user