IPS cheat sheet

From Lolly's Wiki
Revision as of 10:24, 10 April 2013 by Lollypop (talk | contribs)
Jump to navigationJump to search

Cheat sheet

Examples

Repairing packages

Damn fast fingers did it! Lucky Luk style... the man who delete files faster than his shadow...

root@solaris11:/home/lollypop# rm /usr/bin/ls

So... the file is gone... oops.

No problem in Solaris 11. You can repair package contents! But.. in which package was it?

root@solaris11:/home/lollypop# pkg search /usr/bin/ls
INDEX      ACTION VALUE      PACKAGE
path       file   usr/bin/ls pkg:/system/core-os@0.5.11-0.175.0.10.1.0.0

So it is in the package pkg:/system/core-os@0.5.11-0.175.0.10.1.0.0 . Let us take a look what the system thinks what is wrong with our files from this package:

root@solaris11:/home/lollypop# pkg verify  pkg:/system/core-os@0.5.11-0.175.0.10.1.0.0
PACKAGE                                                                 STATUS <3>
pkg://solaris/system/core-os                                             ERROR
        file: usr/bin/ls
                Missing: regular file does not exist

That is exactly what we thougt :-). So let us fix it!

root@solaris11:/home/lollypop# pkg fix  pkg:/system/core-os@0.5.11-0.175.0.10.1.0.0
Verifying: pkg://solaris/system/core-os                         ERROR          <3>
        file: usr/bin/ls
                Missing: regular file does not exist
Created ZFS snapshot: 2013-04-10-07:40:21
Repairing: pkg://solaris/system/core-os                      
                                                                               

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1         1/1      0.0/0.0$<3>

PHASE                                        ACTIONS
Update Phase                                     1/1

PHASE                                          ITEMS
Image State Update Phase                         2/2 
root@solaris11:/home/lollypop# 

Beware of trying this with /usr/bin/pkg !!!

Kategorie:Solaris11