Project

General

Profile

Feature #90

svc.configd should support DB integrity check

Added by Igor Pashev almost 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
2013-01-13
Due date:
% Done:

0%

Estimated time:

Description

Script lib/svc/bin/restore_repository uses lib/svc/bin/sqlite
to check repository integrity check. Obviously it requires sqlite binary.

But since libsqlite is statically linked to svc.configd,
we could add integrity checking into svc.configd.

lib/svc/bin/restore_repository:

        if [ -f $file ]; then
                if [ -r $file ]; then
                        checkresults="`echo PRAGMA integrity_check\; | \
                            /lib/svc/bin/sqlite $file >&1 | grep -v '^ok$'`" 

                        if [ -n "$checkresults" ]; then
                                echo "$file: integrity check failed:" >&2
                                echo "$checkresults" >&2
                                echo
                        else
                                cont=true   
                        fi
                else
                        echo "$file: not readable" 
                fi
        elif [ -n "$file" ]; then
                echo "$file: not found" 
        fi

History

#1

Updated by Igor Pashev almost 7 years ago

  • Description updated (diff)
#2

Updated by Igor Pashev almost 7 years ago

  • Project changed from illumos packaging to Dyson

Also available in: Atom PDF