Skip to content

Commit c2c952c

Browse files
committed
fix(precheck): fix precheck
fix precheck Signed-off-by: ysicing <[email protected]>
1 parent 66fe987 commit c2c952c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

hack/manifests/storage/nfs-server.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ fi
1616

1717
[ -f "/etc/exports" ] && cp -a /etc/exports /etc/exports.bak
1818

19-
SPATH=${1:-/opt/quickon/storage/nfs}
19+
SPATH=${1:-/opt/quickon/storage/nfs/}
2020

2121
[ -d "$SPATH" ] || mkdir -p $SPATH
2222

23-
chmod 777 $SPATH
23+
chmod 777 -R $SPATH
2424

2525
echo "$SPATH *(insecure,rw,sync,no_root_squash,no_subtree_check)" > /etc/exports
2626

internal/pkg/util/preflight/checks.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ func (fcc FileContentCheck) Check() error {
377377
log.Debugf("validating the contents of file %s", fcc.Path)
378378
f, err := os.Open(fcc.Path)
379379
if err != nil {
380-
return errors.Errorf("%s does not exist", fcc.Path)
380+
log.Warnf("%s does not exist", fcc.Path)
381+
return nil
381382
}
382383

383384
lr := io.LimitReader(f, int64(len(fcc.Content)))
@@ -390,7 +391,7 @@ func (fcc FileContentCheck) Check() error {
390391
}
391392

392393
if !bytes.Equal(buf.Bytes(), fcc.Content) {
393-
return errors.Errorf("%s contents are not set to %s", fcc.Path, fcc.Content)
394+
log.Warnf("%s contents are not set to %s", fcc.Path, fcc.Content)
394395
}
395396
return nil
396397
}

0 commit comments

Comments
 (0)