snapshot-rootfs.sh, vmhost-status.sh: New path for btrfs binary
authorMegaBrutal <code+git@megabrutal.com>
Thu, 4 Feb 2016 11:23:06 +0000 (12:23 +0100)
committerMegaBrutal <code+git@megabrutal.com>
Thu, 4 Feb 2016 11:36:49 +0000 (12:36 +0100)
With Ubuntu 15.10, the path of the btrfs binary has changed from /sbin/btrfs to /bin/btrfs.
Therefore, I stopped referring to the binary by full path.
While /bin is in the PATH by default on Ubuntu 15.10 (even for cron jobs),
on older Ubuntus or other distros, you may possibly need to
add /sbin or /bin to the PATH for these scripts.

modified:   fs/snapshot-rootfs.sh
modified:   host/vmhost-status.sh

fs/snapshot-rootfs.sh
host/vmhost-status.sh

index 5b7d05b8e1316d1abda64a3a7dd600ec7cf5b4a7..ca1d01cb46b0f56e465677ea07ab2d0b44c94437 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 mount /btrfs
-/sbin/btrfs subvolume snapshot -r /btrfs/@ /btrfs/@-snapshot-$(date +%Y%m%d%H%M%S)
+btrfs subvolume snapshot -r /btrfs/@ /btrfs/@-snapshot-$(date +%Y%m%d%H%M%S)
 umount /btrfs
index 6e767545fd2bc516af542c5d7b237b4982421098..52de5267dd6648205d71de0584bb24e0a8b1daf3 100755 (executable)
@@ -23,7 +23,7 @@ echo
 echo
 echo BTRFS SUBVOLUMES:
 echo
-/sbin/btrfs subvolume list /
+btrfs subvolume list /
 echo
 echo
 echo LXC CONTAINERS: