| Branch: | Tag: | Revision:

root / snf-image-helper @ 83d0c566

# Date Author Comment
83d0c566 02/03/2014 05:28 pm Nikos Skalkotos

Rewrite the MountImage task

Add code to read /etc/fstab of the *BSD images and mount the remaining
filesystems during MountImage. This only worked for Linux

abe2770c 01/31/2014 07:01 pm Nikos Skalkotos

Remove NUL chars from the output of

1bda0902 01/31/2014 06:46 pm Nikos Skalkotos

Show the partition label in diskpart -l

ee78390c 01/30/2014 01:59 pm Nikos Skalkotos

Minor pep8 error in

0d413fc6 01/30/2014 01:53 pm Nikos Skalkotos

Fix a bug in disklabel enlarge code

If the disk size is greater that 8G then the CHS value of the MBR
will overflow. We should assign a fixed CHS value for this case.

922c1513 01/29/2014 06:04 pm Nikos Skalkotos

Remount every UFS partition rw just to be sure

In many cases although rw flags is passed to mount, the command
returns SUCCESS with a warning that the fs seems to be mounted ro.
Remounting rw does work.

4e364304 01/29/2014 05:00 pm Nikos Skalkotos

Use blockdev instead of partprobe after disklabel

partprobe creates the partitions by itself and since it does not
support disklabels, the disklabel partitons are not recreated

48af2403 01/29/2014 03:28 pm Nikos Skalkotos

Run partprobe after

After enlarges the partition the kernel must be
informed about this

365b2ed3 01/29/2014 02:53 pm Nikos Skalkotos

Add support for resizing OpenBSD UFS file systems

de34e7aa 01/29/2014 12:14 pm Nikos Skalkotos

Add support for enlarging OpenBSD images

This only enlarges the partition and not the ufs file system

9787f9c2 11/05/2013 06:31 pm Nikos Skalkotos

Use /etc/motd to check if a system is OpenBSD

In OpenBSD the first line(s) get overwritten upon each boot by
the rc scripts and kernel informations are added

0925f23a 11/05/2013 01:23 pm Nikos Skalkotos

Rename to

23f62254 11/05/2013 12:28 pm Nikos Skalkotos

Fix a bug in ChagePassword task

In some cases the task removed some shadow/master.passwd entries by
accident because the grep pattern it used was more general than it
should be

666b80ee 11/04/2013 01:08 pm Nikos Skalkotos

The value of DO_SYNC property should be "yes"

In order to reenable fsync() the DO_SYNC image property should be
defined like this:

f3bc7bef 11/01/2013 01:41 pm Nikos Skalkotos

Add a new PASSWORD_HASHING_METHOD image property

This can be used to override the hashing function ChangePassword
task uses. By default for linux and freebsd images, sha512 is used.
For OpenBSD blowfish and for NetBSD sha1.

63a3904a 11/01/2013 11:29 am Nikos Skalkotos

Fix a minor bash variable expansion error

It only affects the printing of an information string

748282cb 10/31/2013 06:29 pm Nikos Skalkotos

Make comply with pep8

d1628244 10/31/2013 04:43 pm Nikos Skalkotos

Add support for sha1 hashing method

This is the default password hashing method for NetBSD.

9e8db27f 10/31/2013 11:04 am Nikos Skalkotos

Fix a function name typo in AssignHostname task

b0e6727c 10/30/2013 06:21 pm Nikos Skalkotos

Add support for Blowfish passwd hashing algorithm

This is not supported by the Linux version of crypt and is needed
for NetBSD and OpenBSD. Add a new python-bcrypt packet in the helper
that implements the OpenBSD Blowfish password hashing algorithm.

b3c48174 10/30/2013 04:55 pm Nikos Skalkotos

Define {open,net}bsd_shadow vars in ChangePassword

Those variables are needed to make ChangePassword work

62e97e7f 10/30/2013 10:40 am Nikos Skalkotos

Fix DeleteSSHKeys to work on non-linux systems

1722e242 10/30/2013 10:30 am Nikos Skalkotos

Add code to detect openbsd flavors

5ff568d5 10/29/2013 06:52 pm Nikos Skalkotos

Add code for detecting NetBSD's in get_distro

f80d3498 10/29/2013 06:18 pm Nikos Skalkotos

Fix a awk bug in get_ufstype function

5c4d4bee 10/29/2013 05:58 pm Nikos Skalkotos

Fix a variable typo in MountImage task

84d01e3e 10/29/2013 03:32 pm Nikos Skalkotos

Add partial support for NetBSD and OpenBSD

Resizing NetBSD and OpenBSD partitions, as well as FFS filesystems
does not work for now

3bb66fac 10/18/2013 11:03 am Nikos Skalkotos

helper: Fix a bug triggered by corrupted images

Fix a bug in get_partition_to_resize where the script would not stop
if the get_partition_table function failed, leading to bash syntax

44e1752d 09/23/2013 01:00 pm Nikos Skalkotos

Merge the ChangeLog files into one

52225f51 09/19/2013 05:52 pm Nikos Skalkotos

Update ChangeLog and version file for 0.10

b1f71820 09/02/2013 05:20 pm Nikos Skalkotos

Update ChangeLogs and version.m4 for 0.9.3

a1d2068f 08/27/2013 12:27 pm Nikos Skalkotos

Update ChangeLogs and version.m4 for v0.9.2

21c40ed6 08/26/2013 12:42 pm Nikos Skalkotos

Make use of devflow building system

c38dcb06 05/16/2013 01:17 pm Nikos Skalkotos

Update ChangeLogs and for ver 0.9.1

8af1ada3 04/23/2013 02:30 pm Nikos Skalkotos

Update ChangeLogs and for ver 0.9

62a6be39 04/23/2013 02:20 pm Nikos Skalkotos

Remove duplicated error report in the helper

1876c955 04/23/2013 12:48 pm Nikos Skalkotos

Add some extra checks on FreeBSD images

7fd2dad2 04/22/2013 10:13 pm Nikos Skalkotos

Fix yet another bug in the helper monitoring code

In bash command substitution may trim the output. We need to count
the stderr lines after we use tail and not before

2b79f174 04/22/2013 04:18 pm Nikos Skalkotos

Fix a bug in the extended partition detection code

Sometimes sfdisk --print-id does not return the id because it
erroneously detects the partition as being GPT. Add a --force to
overcome this.

e0d2dc8f 04/22/2013 04:10 pm Nikos Skalkotos

Make file injection work with freebsd

102f6179 04/22/2013 12:55 pm Nikos Skalkotos

Fix a bug in the helper monitoring code

In the STDERR command a `:' was missing

b1cb73f2 04/18/2013 05:36 pm Nikos Skalkotos

Add support for FreeBSD

File injection isn't implemented yet

9ec298c7 04/16/2013 05:53 pm Nikos Skalkotos

Use sgdisk to create gpt partitions

b0cb7802 04/16/2013 12:37 pm Nikos Skalkotos

Replace script with `sgdisk -e'

f58bbc57 04/09/2013 01:59 pm Nikos Skalkotos

Correct some pep8 errors in the python helpers

ed49b246 03/12/2013 06:38 pm Nikos Skalkotos

Update ChangeLogs and for ver 0.8.1

289f2f55 03/12/2013 06:30 pm Nikos Skalkotos

Update contact email address

Use as email for feedback and bug reports

aea26aab 03/11/2013 05:03 pm Nikos Skalkotos

Update ChangeLogs and for version 0.8

21063d2d 03/07/2013 11:42 am Nikos Skalkotos

Make helper_ip and monitor_port configurable

Let the host system provide those values to the helper through the
kernel command line.

b2592d38 03/06/2013 08:28 pm Nikos Skalkotos

Monitor helper through UDP packages in xen

d509231b 02/20/2013 07:49 pm Nikos Skalkotos

Make monitoring work with xen

  • Add custom vif script for the helper VM
  • Cleanup helper code
e777f9d5 02/08/2013 06:37 pm Nikos Skalkotos

Remove hardcoded FLOPPY_DEV in helper

Check the cmdline of the kernel to determine what device to check
for find the rules file

107e56e0 02/08/2013 06:31 pm Nikos Skalkotos

In xen use the helper image in ro mode

Make sure everything works even when the root filesystem in the helper
VM is mounted read-only.

f7a4021c 02/07/2013 06:04 pm Nikos Skalkotos

Merge branch 'master' into xen


fcae4e91 02/07/2013 12:11 pm Nikos Skalkotos

Cleanup Xen code

Make it comply with the rest of the software. Some things are not
ready yet.

db7d9df2 01/21/2013 06:47 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.7.6

87a73976 01/21/2013 06:16 pm Nikos Skalkotos

Fix a bug in DeleteSSHkeys

The code for checking for non-default keys was never called

94a16b02 01/21/2013 05:47 pm Nikos Skalkotos

Mount /dev & /proc in the helper before chrooting

a5b79338 01/17/2013 02:49 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.7.5

c560d175 01/08/2013 04:11 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.7.4

e2510438 01/07/2013 08:09 pm Nikos Skalkotos

Mount all local filesystems when deploying images

If the image has /home on a different partition than /, then
we'll need to have it mounted to inject files on a user's home

0e707fe3 01/07/2013 04:07 pm Nikos Skalkotos

Fix a bug in get_partition_to_resize

Fix a typo in a variable name

bd6f95c7 01/04/2013 06:16 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.7.3

2d4e2b7a 01/04/2013 04:46 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.7.2

8c2dc27c 01/04/2013 03:59 pm Nikos Skalkotos

Fix AssignHostname task for arch linux

If both /etc/rc.conf and /etc/hostname are missing, create the latter
to host the hostname.

834f8fc0 01/03/2013 08:54 pm Nikos Skalkotos

Treat partitions with id="f" as extended

Partitions with id=0x0F are extended partitions with LBA addressing.

33e9b1b1 12/16/2012 09:41 am Nikos Skalkotos

Check for /etc/hostname in AssignHostname task

By default without investigating the distro of the guest VM, check
for the presence of /etc/hostname file. This is the default place
for static host names in systems that use the systemd startup deamon.

b3aefbbc 12/16/2012 12:07 am Nikos Skalkotos

Fix helper's error monitoring system

Fix a bug where errors that where not created using log_error where
not registered to the monitoring subsystem.

4989b80b 12/14/2012 06:53 pm Nikos Skalkotos

del c:\windows\panther\unattend.xml after sysprep

Make sure the cached unattend xml file gets deleted after sysprep

72882e1f 12/07/2012 05:34 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.7.1

81ca2790 12/07/2012 05:31 pm Nikos Skalkotos

In helper put sysrq shutdown cmd in an inf loop

This is needed because in some cases, the init could exit before the
system shut down causing a KERNEL PANIC.

a7a7b869 12/03/2012 05:17 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.7

ab106eec 12/03/2012 05:08 pm Nikos Skalkotos

Credit for the helper VM shutdown

Stratos Psomadakis suggested to shutdoen the helper VM using the `o'
Magic SsysRq key

995a47c9 12/02/2012 11:14 am Nikos Skalkotos

Code cleanup

Make sure local variables are defined as local before they get assigned.
Having variables get defined and assigned in one line like this:

local var=foo

can sometimes cause problems. For example, this line:

local var=$(false)

will return 0 and the script will not fail if set -x is defined.

1d6db483 11/22/2012 02:15 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.6.5

2a5be644 11/22/2012 02:15 pm Nikos Skalkotos

Fix a bug introduced in 9fca5245a2eae67af86719bb0f

AssignHostname task did not search for Unattend.xml in a case
insensitive way.

c459a69d 11/15/2012 06:40 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.6.4

e47ad37e 11/13/2012 03:17 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.6.3

7a7e0f27 11/13/2012 03:17 pm Nikos Skalkotos

Fix a bug in helper's error monitoring system

Make sure that if log_error is executed like this:

log_error "text" "text"

The 2 arguments get merged before being fed to the monitoring system.

4f7c2aeb 11/13/2012 03:16 pm Nikos Skalkotos

Check if the img_properties are decoded correct

In image helper, check if returned 0 and log
the error if this is not the case.

0c541fe8 11/13/2012 03:16 pm Nikos Skalkotos

Fix minor typo in ChangePassword task

878898d1 11/13/2012 03:16 pm Nikos Skalkotos

Don't overwrite C:\Unattend.xml in the windows

If unattend.xml is present in the windows image, use this one unless
USE_DEFAULT_UNATTEND is specified as an image property.

90db2151 11/13/2012 03:16 pm Nikos Skalkotos

Fix the error messages in helper

9c4a2181 11/13/2012 03:03 pm Nikos Skalkotos

Fix a bug in the helper's monitoring system

Fix a bug where the helper will not send a image-helper-error msg
if an error occures when running snf-image-helper main script and
not one of the configuration tasks.


3e5d018a 11/13/2012 01:16 pm Nikos Skalkotos

Update ChangeLog and for ver. 0.6.2

0ac22d10 11/13/2012 01:12 pm Nikos Skalkotos

Update ChangeLog and for version 0.6.1

f44a30e6 10/11/2012 05:35 pm Nikos Skalkotos

In ChangePassword task check if the users exist

Check if the users stated in the USERS image property do actually

d309cd33 10/03/2012 04:56 pm Nikos Skalkotos

Suppress a reglookup warning

Hundred of warnings like this: `WARN: While quoting value for
'<registry_key>', warning returned: Data could not be interpreted,
quoting raw buffer.' are outputed when reglookup reads the registry
of a Windows 2012 system.

1ea8db72 09/29/2012 05:46 am Dimitris Aragiorgis

Use socat to dump helper messages in case of xen

Helper gets a dummy interface and communication between helper
and host is done via socat STDIO INTERFACE:eth0/vif$helperid.0

Signed-off-by: Dimitris Aragiorgis <>

e9413eab 09/28/2012 09:41 pm Dimitris Aragiorgis

Make use of XenStore to export SUCCESS msg

Signed-off-by: Dimitris Aragiorgis <>

72052003 09/28/2012 08:17 pm Dimitris Aragiorgis

Xen support

Support launching helper domain on top of Xen hypervisor under PV mode.

Helper VM becomes hypervisor aware by passing hypervisor=$HYPERVISOR
in the kernel command line and thus acts accordingly (which logging
devices to use, what disk/floppy devices to expect, etc)...

beeb8f9f 09/28/2012 04:46 pm Nikos Skalkotos

Disable fsyncs in helper's VM resize operation

You can disable this behaviour by defining the DO_SYNC image property.

fa0ee03b 09/26/2012 04:40 pm Nikos Skalkotos

Add back the snf_image_activate_helper check

b2bffe91 09/26/2012 03:05 pm Nikos Skalkotos

Remove the boot and shutdown process in helper VM

Make snf-image-helper ran as init process when calling the helper
VM. Also make the helper VM shut down quickly by using the shut off

603c05f7 09/24/2012 12:05 pm Nikos Skalkotos

Use UTC when calling date command

f55d6d0c 09/17/2012 06:02 pm Nikos Skalkotos

Drop the `user' password reset rule

Drop the rule that resets the password for user with username `user'
if the USERS image property is missing and the system is detected
to be a Fedora or a Ubuntu Linux system.

ea69a537 09/14/2012 04:43 pm Nikos Skalkotos

Update ChangeLog and configure for version 0.6

c50358a6 09/06/2012 01:10 pm Nikos Skalkotos

Make sure EnforcePersonality runs last

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.

68ec47be 08/31/2012 11:57 am Nikos Skalkotos

Update ChangeLog and configure for version 0.5

82c29397 08/31/2012 10:55 am Nikos Skalkotos

Update ChangeLog and for v0.4.2