2

I import a rc.local become a SVC service

Procedure work but.. I see two manifest!

svcs -l  svc:/site/rclocal:default
fmri         svc:/site/rclocal:default
name         Run-once service
enabled      true
state        online
next_state   none
state_time   17 dicembre 2017 02:02:50 CET
logfile      /var/svc/log/site-rclocal:default.log
restarter    svc:/system/svc/restarter:default
manifest     /root/rc.local.xml
manifest     /lib/svc/manifest/system/rc.local.xml
dependency   require_all/none svc:/system/filesystem/local:default (online)

Question is: how to delete one manifest? Thanks

elbarna
  • 12,050
  • 22
  • 92
  • 170
  • 1
    I don't know why this was downvoted. Seems like a legitimate question to me. – jesse_b Dec 17 '17 at 01:26
  • did you run `svccfg import /lib/svc/manifest/system/rc.local.xml` ? – jesse_b Dec 17 '17 at 01:40
  • 1
    If that doesn't work my hunch is you imported the service from your `/root/` directory and that is why you have two manifests. You may need to delete the service and re-import from the correct location. http://www.oracle.com/technetwork/server-storage/solaris/solaris-smf-manifest-wp-167902.pdf – jesse_b Dec 17 '17 at 01:59
  • I made it..but return this error The manifest being imported is from a standard location and should be imported with the command : svcadm restart svc:/system/manifest-import I did the command,but service not appear – elbarna Dec 17 '17 at 20:07

1 Answers1

2

Old one but...

  1. mv /lib/svc/manifest/system/rc.local.xml to someplace
  2. svcadm restart svc:/system/manifest-import
  3. check that rclocal is gone: svcs -l rclocal

  4. mv rc.local.xml back to the /lib/svc/manifest/system/rc.local.xml, but better to the /lib/svc/manifest/site/

  5. svcadm restart svc:/system/manifest-import
  6. check again: svcs -l rclocal
E S
  • 36
  • 2