I am working on building a live image for systemtap.  I was hoping to leverage 
as much from the the existing fedora-livecd-desktop.ks file using the %include 
and just have the additional systemtap related stuff in the file. One of the 
things I would like to do is add some groups to the live user using the 
following in my kickstart file:

%post
# add fedora user to SystemTap groups
usermod -a -G stapusr,stapdev liveuser
%end

However, I get a message it can't find the usermod command:

/tmp/ks-script-6n4lG0: line 3: usermod: command not found
ignoring %post failure (code 127)

Attached is the fedora-live-stap2.ks that demonstrates the problem.  The 
kickstart file is in /usr/share/spin-kickstarts.  Attempt to create the live 
iso with:


setenforce 0
livecd-creator -v --cache=`pwd`/cache -t `pwd`/tmp \
--releasever=16 --config=/usr/share/spin-kickstarts/fedora-live-stap2.ks \
--logfile=usermod_prob.log \
--fslabel=Fedora-16-x86_64-Live-stap2 >& output-20120109a.log

Image is bootable, but the liveuser is not a member of stapusr or stapdev.  Is 
there some way to get the usermod command to work in this kickstart file? 
Putting a usermod command right after the useradd in fedora-live-base.ks works, 
but it would be nice to be able to use the stock fedora-live-base.ks.

-Will

# Desktop with customizations to for systemtap tutorial
# Maintained by the Fedora Desktop SIG:
# http://fedoraproject.org/wiki/SIGs/Desktop
# mailto:[email protected]

#repo --name=rawhide-debuginfo 
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide-debug-&arch=$basearch
repo --name=fedora-debuginfo 
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
repo --name=updates-debuginfo 
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f$releasever&arch=$basearch
#repo --name=updates-testing 
--mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-debug-f$releasever&arch=$basearch

%include fedora-livecd-desktop.ks

part / --size 8192 --fstype ext4

%packages
# Material added for SystemTap tutorial
kernel-devel
kernel-debuginfo
systemtap*
-systemtap-debuginfo

%end

%post
# FIXME want to do this here, but livecd-creator cannot find usermod
# add fedora user to SystemTap groups
usermod -a -G stapusr,stapdev liveuser
%end
--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to