스냅샷: 오류: 작업이 너무 이르거나 장치가 아직 시드되지 않았거나 장치 모델이 확인되지 않았습니다.

스냅샷: 오류: 작업이 너무 이르거나 장치가 아직 시드되지 않았거나 장치 모델이 확인되지 않았습니다.

mysql-workbench-communityand 설치를 자동화하려고 합니다 . 그러나 실행하면 오류가 발생합니다.postmansnapsnap install mysql-workbench-community --classicerror: too early for operation, device not yet seeded or device model not acknowledged

snap install mysql-workbench-community --classic두 번째 또는 세 번째 실행을 시도하면 결국 설치됩니다.

snap현재 해결 방법으로 설치 여부를 확인 하고 설치된 경우 루프를 종료하는 루프를 만들었습니다 . 설치되지 않은 경우 snap실패하기 전에 30번 설치를 시도합니다 .

스크립트는 다음과 같습니다.

#!/bin/bash

counter=0

dnf install epel-release -y
dnf install snapd -y
if [ ! -L /snap ]; then
        ln -s /var/lib/snapd/snap /snap
fi
systemctl enable --now snapd.socket



echo -n "Installing MySQL Workbench ... "
while true
do
        if snap list 2>/dev/null |  grep -q mysql-workbench-community; then 
                break
        else
                snap install mysql-workbench-community --classic
                let "counter+=1"
                sleep 5
        fi

        if [ $counter = 30 ]; then
                exit 10
        fi

done
echo "OK"


snap connect mysql-workbench-community:password-manager-service
snap connect mysql-workbench-community:ssh-keys

echo -n "Installing Postman ... "
while true
do
        if snap list 2>/dev/null |  grep -q postman; then 
                break
        else
                snap install postman --classic
                let "counter+=1"
                sleep 5
        fi

        if [ $counter = 30 ]; then
                exit 10
        fi
done
echo "OK"

snap작동하기 전에 왜 여러번 설치해야 하는지, 루프를 만들지 않으려면 어떻게 해야 하는지 궁금합니다 .

관련 정보