Make sure EnforcePersonality runs last
authorNikos Skalkotos <skalkoto@grnet.gr>
Thu, 6 Sep 2012 09:55:35 +0000 (12:55 +0300)
committerNikos Skalkotos <skalkoto@grnet.gr>
Thu, 6 Sep 2012 10:10:29 +0000 (13:10 +0300)
When a users inject a file in an image that already exists,
we want to make sure that this file is not altered by any other task.
So, the EnforcePersonality task, is the last task that should run
before the image is unmounted.

snf-image-helper/tasks/40AddSwap.in
snf-image-helper/tasks/40DeleteSSHKeys.in
snf-image-helper/tasks/40DisableRemoteDesktopConnections.in
snf-image-helper/tasks/40InstallUnattend.in
snf-image-helper/tasks/40SELinuxAutorelabel.in
snf-image-helper/tasks/50AssignHostname.in
snf-image-helper/tasks/50ChangePassword.in
snf-image-helper/tasks/50FilesystemResizeMounted.in
snf-image-helper/tasks/60EnforcePersonality.in [moved from snf-image-helper/tasks/50EnforcePersonality.in with 98% similarity]
snf-image-helper/tasks/Makefile.am

index 419dadd..437b62f 100644 (file)
@@ -19,7 +19,7 @@
 
 ### BEGIN TASK INFO
 # Provides:            AddSwap
-# RunBefore:            UmountImage
+# RunBefore:            EnforcePersonality
 # RunAfter:             MountImage
 # Short-Description:    Set up the swap partition and add an entry in fstab
 ### END TASK INFO
index 9418cc5..9b80630 100644 (file)
@@ -19,7 +19,7 @@
 
 ### BEGIN TASK INFO
 # Provides:            DeleteSSHKeys
-# RunBefore:            UmountImage
+# RunBefore:            EnforcePersonality
 # RunAfter:             MountImage
 # Short-Description:   Remove ssh keys and in some cases recreate them
 ### END TASK INFO
index 2c2d851..f905dc7 100644 (file)
 
 ### BEGIN TASK INFO
 # Provides:            DisableRemoteDesktopConnections
-# RunBefore:            UmountImage
+# RunBefore:            EnforcePersonality
 # RunAfter:            MountImage
 # Short-Description:   Temporary Disable Remote Desktop Connections
 ### END TASK INFO
 
 #
-# This task will change the value of `fDenyTSConnection' registry key located in
-# `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\' to
-# "true". This will disable RDP connections. The key will change back to "false"
-# during the specialize pass of the Windows setup.
+# This task will change the value of `fDenyTSConnection' registry key located
+# in `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\' to
+# "true". This will disable RDP connections. The key will change back to
+# "false" during the specialize pass of the Windows setup.
 #
 
 set -e
index bb418b4..8624f32 100644 (file)
@@ -19,7 +19,7 @@
 
 ### BEGIN TASK INFO
 # Provides:            InstallUnattend
-# RunBefore:           UmountImage
+# RunBefore:           EnforcePersonality
 # RunAfter:            MountImage
 # Short-Description:   Installs Unattend.xml for unattended windows setup
 ### END TASK INFO
index d9785a9..3d147e1 100644 (file)
@@ -19,7 +19,7 @@
 
 ### BEGIN TASK INFO
 # Provides:            SELinuxAutorelabel
-# RunBefore:            UmountImage
+# RunBefore:            EnforcePersonality
 # RunAfter:             MountImage
 # Short-Description:   Force the system to relabel at next boot
 ### END TASK INFO
index fce2f2f..a45434d 100644 (file)
@@ -19,7 +19,7 @@
 
 ### BEGIN TASK INFO
 # Provides:            AssignHostname
-# RunBefore:            UmountImage
+# RunBefore:            EnforcePersonality
 # RunAfter:            InstallUnattend
 # Short-Description:   Assign Hostname/Computer Name to the instance
 ### END TASK INFO
index 19aacd9..c5aa7f8 100644 (file)
@@ -19,7 +19,7 @@
 
 ### BEGIN TASK INFO
 # Provides:            ChangePassword
-# RunBefore:            UmountImage
+# RunBefore:            EnforcePersonality
 # RunAfter:            InstallUnattend
 # Short-Description:   Changes Password for specified users
 ### END TASK INFO
index 4fec7c9..5da1704 100644 (file)
@@ -19,7 +19,7 @@
 
 ### BEGIN TASK INFO
 # Provides:            FilesystemResizeMounted
-# RunBefore:            UmountImage
+# RunBefore:            EnforcePersonality
 # RunAfter:            InstallUnattend
 # Short-Description:   Resize filesystem to use all the available space
 ### END TASK INFO
@@ -20,7 +20,7 @@
 ### BEGIN TASK INFO
 # Provides:            EnforcePersonality
 # RunBefore:           UmountImage
-# RunAfter:            DeleteSSHKeys
+# RunAfter:            MountImage
 # Short-Description:   Inject files to the instance
 ### END TASK INFO
 
index 1e9175c..709a41b 100644 (file)
@@ -10,9 +10,9 @@ dist_tasks_SCRIPTS = \
                40InstallUnattend \
                40SELinuxAutorelabel \
                50AssignHostname \
-               50EnforcePersonality \
-               50FilesystemResizeMounted \
                50ChangePassword \
+               50FilesystemResizeMounted \
+               60EnforcePersonality \
                80UmountImage
 
 edit = sed \