Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yc-image-cleanup.sh поведение в случае незаполненной переменной YCCLEANUP_SYS_USER #165

Open
tarwirdur opened this issue Jan 11, 2023 · 0 comments

Comments

@tarwirdur
Copy link

https://github.com/yandex-cloud/examples/blob/master/products-prepare/linux/yc-image-cleanup.sh

    if [ ! -z "$YCCLEANUP_SYS_USER" ]; then
     ...
    fi
    echo "DONE"

Removing system user... DONE выводится вне зависимости от того был удален пользователь или нет.
Может стоит выводить предупрежение или писать SKIPPED вместо DONE?

Ещё можно было бы добавить опцию, которая возьмет имя системного пользователя из $SUDO_USER.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant