remote device rw on start
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 29 Mar 2011 18:00:40 +0000 (18:00 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 29 Mar 2011 18:00:40 +0000 (18:00 +0000)
git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@244 191e9f34-6774-4a6d-acfc-7664dacd4a2a

recepies/lxc/lxc-watchdog.sh

index 5c821fa..93ffcfe 100755 (executable)
@@ -133,7 +133,8 @@ lxc_start() {
 
        if ! lxc-info -n $name | grep RUNNING ; then
                lxc_log "$name start"
-               mount $rootfs -o remount,rw # fix debian upgrade which remounts dir ro
+               dev=`df -P $rootfs | tail -1 | cut -d" " -f1`
+               mount $dev -o remount,rw # fix debian upgrade which remounts dir ro
                lxc-start -n $name -o /tmp/${name}.log -d
                lxc-wait  -n $name -s RUNNING
                lxc-info  -n $name