CloudStack guest-set-password Script For Arch Linux

Arch Linux does a few things differently that breaks the CloudStack password reset script,

  1. Arch Linux uses Systemd instead of the traditional SysVinit/initscripts
  2. If you have followed the Beginners Guide, the default DHCP client installed is dhcpcd

Modified scripts that work with systemd and dhcpcd are at my Github Repo. The install steps roughly are as below:

$ pacman -S wget dhcpcd
$ pacman -Qi dhcpcd
Name           : dhcpcd
Version        : 6.0.5-1
Description    : RFC2131 compliant DHCP client daemon
Architecture   : x86_64
URL            : http://roy.marples.name/projects/dhcpcd/
Licenses       : BSD
Groups         : base
Provides       : dhcp-client
Depends On     : glibc  sh
Optional Deps  : None
Required By    : None
Optional For   : netctl
Conflicts With : None
Replaces       : None
Installed Size : 285.00 KiB
Packager       : Dave Reisner <dreisner@archlinux.org>
Build Date     : Sat Aug 3 20:50:18 2013
Install Date   : Tue Oct 1 12:19:02 2013
Install Reason : Explicitly installed
Install Script : No
Validated By   : Signature
$ systemctl enable dhcpcd@eth0
ln -s '/usr/lib/systemd/system/dhcpcd@.service'
'/etc/systemd/system/multi-user.target.wants/dhcpcd@eth0.service'
$ cp -v cloudstack-set-guest-password /usr/lib/systemd/scripts/
$ cp -v cloudstack-set-guest-password.service /usr/lib/systemd/system/
$ systemctl enable cloudstack-set-guest-password.service
ln -s '/usr/lib/systemd/system/cloudstack-set-guest-password.service'
'/etc/systemd/system/multi-user.target.wants/cloudstack-set-guest-password.service'

These scripts have received minimal testing so YMMV.

Update (20131003): Arch Linux “cloudstack-set-guest-sshkey” script is also on Github now. See README.md

Shanker Balan

Shanker Balan is a devops and infrastructure freelancer with over 14 years of industry experience in large scale Internet systems. He is available for both short term and long term projects on contract. Please use the Contact Form for any enquiry.

More Posts - Website

Follow Me:
TwitterLinkedIn

Published by

Shanker Balan

Shanker Balan is a devops and infrastructure freelancer with over 14 years of industry experience in large scale Internet systems. He is available for both short term and long term projects on contract. Please use the Contact Form for any enquiry.

One thought on “CloudStack guest-set-password Script For Arch Linux”

  1. Hello! I was wondering whether or not this works for CentOS 7.1, which uses system.

    Right now the service is enabled but when I check the logs via systemctl, it seems that the password server does not send any new password.

Leave a Reply