Project

General

Profile

Actions

Feature #90

open

svc.configd should support DB integrity check

Added by Igor Pashev over 11 years ago. Updated about 11 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

Actions #1

Updated by Igor Pashev over 11 years ago

  • Description updated (diff)
Actions #2

Updated by Igor Pashev about 11 years ago

  • Project changed from illumos packaging to Dyson
Actions

Also available in: Atom PDF