[redhat-lspp] LSPP kickstart patch

Matt Anderson mra at hp.com
Thu Nov 9 21:55:14 UTC 2006


Attached is a patch to the kickstart config which sets up Cups at
install time.  The patch contains the changes to cupsd.conf which are
needed, but assumes that lspp-config/lspp has been populated with
client.conf, mime.convs and mime.types  from my online documentation:
http://free.linux.hp.com/~mra/docs/

-matt
-------------- next part --------------
diff --git a/lspp-config.spec.in b/lspp-config.spec.in
index 0643aa2..1dcc333 100644
--- a/lspp-config.spec.in
+++ b/lspp-config.spec.in
@@ -35,6 +35,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(0644,root,root) %{_datadir}/lspp/*.defs
 %attr(0644,root,root) %{_datadir}/lspp/*.conf
 %attr(0644,root,root) %{_datadir}/lspp/*.te
+%attr(0644,root,root) %{_datadir}/lspp/mime.*
 %attr(0644,root,root) %{_datadir}/lspp/sshd_config
 %attr(0755,root,root) %dir %{_datadir}/doc/@@NAME@@-%{version}
 %attr(0644,root,root) %{_datadir}/doc/@@NAME@@-%{version}/*
diff --git a/lspp-config/bin/lspp-eal4-config.in b/lspp-config/bin/lspp-eal4-config.in
index abf56d7..e63426f 100755
--- a/lspp-config/bin/lspp-eal4-config.in
+++ b/lspp-config/bin/lspp-eal4-config.in
@@ -206,19 +206,25 @@ ConfigureCups() {
 
         if ! grep -q '^RunAsUser Yes$' $CupsConf
         then
-                if egrep -q '^(User|Group)' $CupsConf \
-                || ! grep -q '^#Group' $CupsConf
+                if egrep -q '^(User|Group)' $CupsConf
                 then
                         Warn "Warning: $CupsConf was changed from default, can't modify it"
 			_FAILURE=1
                 fi
-                sed '/#Group/{
+                sed 's/Listen localhost/#Listen localhost/;
+                     s/Browsing On/Browsing Off/;
+		     /^SystemGroup/{
 aUser lp
 aGroup sys
 aRunAsUser Yes
+aClassification mls
+aClassifyOverride no
 }' < $CupsConf > $CupsConf.new
                 
                 Replace $CupsConf removing $CupsConf.new
+		Replace $_CUPS_DEST/$_CUPS_CLIENT with $_BASE/$_CUPS_CLIENT
+		Replace $_CUPS_DEST/$_CUPS_MIMET with $_BASE/$_CUPS_MIMET
+		Replace $_CUPS_DEST/$_CUPS_MIMEC with $_BASE/$_CUPS_MIMEC
         fi
     else
         Log "reconfiguring CUPS declined"
@@ -732,7 +738,7 @@ Please read the documentation before pro
     ConfigureFTP
     ConfigureAudit
     ConfigurePostfix
-    #ConfigureCups
+    ConfigureCups
     ConfigurePolyinstantiation
     DisableUsbfs
     SetRunLevel 3
@@ -1011,6 +1017,10 @@ readonly _AUDITD_CONF=auditd.conf
 readonly _VSFTPD_CONF=/etc/vsftpd/vsftpd.conf
 readonly _NAMESPACE_CONF=namespace.conf
 readonly _LSPP_POLICY=lspp_policy.te
+readonly _CUPS_CLIENT=client.conf
+readonly _CUPS_MIMET=mime.types
+readonly _CUPS_MIMEC=mime.convs
+readonly _CUPS_DEST=/etc/cups
 
 # this will get the name of the arch-dependent packages file
 #  and go readonly in Main()


More information about the redhat-lspp mailing list