61 lines
3 KiB
Diff
61 lines
3 KiB
Diff
|
## this patch allows the addition of custom scripts to prepare/cleanup the target
|
||
|
## directory before/after package installation
|
||
|
## it is necessary for the samba package as it requires /proc/ during installation
|
||
|
--- dfsbuild.orig/dfsbuild-0.99.2/Actions.hs 2006-04-20 00:10:11.000000000 +0200
|
||
|
+++ dfsbuild/dfsbuild-0.99.2/Actions.hs 2007-01-03 15:36:59.000000000 +0100
|
||
|
@@ -43,6 +43,11 @@
|
||
|
finished Bootstrapped
|
||
|
Bootstrapped -> -- Time to install shared files
|
||
|
do installlib env
|
||
|
+ finished EnvironmentPrepared
|
||
|
+ EnvironmentPrepared -> -- execute configurable hook scripts
|
||
|
+ do im $ "Executing preparation scripts"
|
||
|
+ mapM_ (safeSystem `flip` [ targetdir env ])
|
||
|
+ (splitWs $ eget env "preparescripts")
|
||
|
finished LibsInstalled
|
||
|
LibsInstalled -> -- Install additional packages
|
||
|
do installpkgs env
|
||
|
@@ -68,6 +73,11 @@
|
||
|
do safeSystem "mkcramfs" [(targetdir env) ++ "/opt/initrd",
|
||
|
(targetdir env) ++ "/boot/initrd.dfs"]
|
||
|
recursiveRemove SystemFS $ (targetdir env) ++ "/opt/initrd"
|
||
|
+ finished EnvironmentCleaned
|
||
|
+ EnvironmentCleaned -> -- execute configurable hook scripts
|
||
|
+ do im $ "Executing preparation scripts"
|
||
|
+ mapM_ (safeSystem `flip` [ targetdir env ])
|
||
|
+ (splitWs $ eget env "cleanupscripts")
|
||
|
finished RamdiskBuilt
|
||
|
RamdiskBuilt -> -- Install the bootloader
|
||
|
do (isoargs, blfunc) <- Bootloader.install env
|
||
|
--- dfsbuild.orig/dfsbuild-0.99.2/Utils.hs 2007-01-01 23:06:17.000000000 +0100
|
||
|
+++ dfsbuild/dfsbuild-0.99.2/Utils.hs 2007-01-03 15:33:00.000000000 +0100
|
||
|
@@ -30,10 +31,10 @@
|
||
|
marker :: String,
|
||
|
datestr :: String}
|
||
|
|
||
|
-data DFSState = Fresh | Initialized | Mirrored | Bootstrapped | Installed
|
||
|
- | LibsInstalled | DebsInstalled | CfgHandled | InitPrepped
|
||
|
+data DFSState = Fresh | Initialized | Mirrored | Bootstrapped | EnvironmentPrepared
|
||
|
+ | Installed | LibsInstalled | DebsInstalled | CfgHandled | InitPrepped
|
||
|
| RDPrepped
|
||
|
- | KernelsInstalled | RamdiskBuilt | BootloaderInstalled
|
||
|
+ | KernelsInstalled | EnvironmentCleaned | RamdiskBuilt | BootloaderInstalled
|
||
|
deriving (Eq, Show, Read, Ord)
|
||
|
|
||
|
im = infoM "dfs"
|
||
|
--- dfsbuild.orig/dfsbuild-0.99.2/dfs.cfg 2006-07-02 01:46:22.000000000 +0200
|
||
|
+++ dfsbuild/dfsbuild-0.99.2/dfs.cfg 2007-01-03 15:40:22.000000000 +0100
|
||
|
@@ -115,6 +115,12 @@
|
||
|
/var/log/dpkg.log
|
||
|
/var/log/bootstrap.log
|
||
|
|
||
|
+# Scripts that should be executed after bootstrapping and before package installation
|
||
|
+#preparescripts =
|
||
|
+
|
||
|
+# Scripts that should be executed after package installation and before iso generation
|
||
|
+#cleanupscripts =
|
||
|
+
|
||
|
######################################################################
|
||
|
# Arch settings: i386
|
||
|
######################################################################
|