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

src/vstart.sh: Only execute btrfs if it is available #11683

Merged
merged 1 commit into from Nov 10, 2016

Conversation

wjwithagen
Copy link
Contributor

Signed-off-by: Willem Jan Withagen wjw@digiware.nl

@@ -661,7 +661,9 @@ if [ "$start_osd" -eq 1 ]; then
EOF

rm -rf $CEPH_DEV_DIR/osd$osd || true
for f in $CEPH_DEV_DIR/osd$osd/*; do btrfs sub delete $f &> /dev/null || true; done
if [ -x /usr/bin/btrfs ]; then
Copy link
Contributor

@tchaikov tchaikov Nov 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btrfs is considered as a system administration command, and usually lives in /usr. probably you can use command -v instead to avoid this fuss? i.e.

if command -v btrfs > /dev/null; then
  ...
fi

or

if [ -x `command -v btrfs` ]; then
  ...
fi

for less typing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov
Never too old to learn. 8=) checking out command

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov
Ping.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
@wjwithagen
Copy link
Contributor Author

@tchaikov
FreeBSD seems happy...

@tchaikov
Copy link
Contributor

tchaikov commented Nov 2, 2016

lgtm

@tchaikov tchaikov self-assigned this Nov 2, 2016
@tchaikov tchaikov merged commit f628bac into ceph:master Nov 10, 2016
@wjwithagen wjwithagen deleted the wip-wjw-freebsd-vstart branch January 4, 2017 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants