Output when NOT running on LXC (a linode machine in this case): (...) Preparing to replace grub-pc 1.99-21ubuntu3.7 (using .../grub-pc_1.99-21ubuntu3.8_i386.deb) ... Unpacking replacement grub-pc ... Preparing to replace grub-pc-bin 1.99-21ubuntu3.7 (using .../grub-pc-bin_1.99-21ubuntu3.8_i386.deb) ... Unpacking replacement grub-pc-bin ... Preparing to replace grub2-common 1.99-21ubuntu3.7 (using .../grub2-common_1.99-21ubuntu3.8_i386.deb) ... Unpacking replacement grub2-common ... Preparing to replace grub-common 1.99-21ubuntu3.7 (using .../grub-common_1.99-21ubuntu3.8_i386.deb) ... Unpacking replacement grub-common ... Processing triggers for man-db ... Processing triggers for install-info ... Processing triggers for ureadahead ... Setting up grub-common (1.99-21ubuntu3.8) ... Setting up grub2-common (1.99-21ubuntu3.8) ... Setting up grub-pc-bin (1.99-21ubuntu3.8) ... Setting up grub-pc (1.99-21ubuntu3.8) ... Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-36-virtual Found initrd image: /boot/initrd.img-3.2.0-36-virtual Found linux image: /boot/vmlinuz-3.2.0-35-virtual Found initrd image: /boot/initrd.img-3.2.0-35-virtual done root@ls3-precise:~# echo $? 0 root@ls3-precise:~# which running-in-container /bin/running-in-container root@ls3-precise:~# running-in-container root@ls3-precise:~# echo $? 1 root@ls3-precise:~#
Output when NOT running on LXC (a linode machine in this case): pc_1.99- 21ubuntu3. 8_i386. deb) ... pc-bin_ 1.99-21ubuntu3. 8_i386. deb) ... common_ 1.99-21ubuntu3. 8_i386. deb) ... common_ 1.99-21ubuntu3. 8_i386. deb) ... 3.2.0-36- virtual img-3.2. 0-36-virtual 3.2.0-35- virtual img-3.2. 0-35-virtual in-container in-container in-container
(...)
Preparing to replace grub-pc 1.99-21ubuntu3.7 (using .../grub-
Unpacking replacement grub-pc ...
Preparing to replace grub-pc-bin 1.99-21ubuntu3.7 (using .../grub-
Unpacking replacement grub-pc-bin ...
Preparing to replace grub2-common 1.99-21ubuntu3.7 (using .../grub2-
Unpacking replacement grub2-common ...
Preparing to replace grub-common 1.99-21ubuntu3.7 (using .../grub-
Unpacking replacement grub-common ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Processing triggers for ureadahead ...
Setting up grub-common (1.99-21ubuntu3.8) ...
Setting up grub2-common (1.99-21ubuntu3.8) ...
Setting up grub-pc-bin (1.99-21ubuntu3.8) ...
Setting up grub-pc (1.99-21ubuntu3.8) ...
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
done
root@ls3-precise:~# echo $?
0
root@ls3-precise:~# which running-
/bin/running-
root@ls3-precise:~# running-
root@ls3-precise:~# echo $?
1
root@ls3-precise:~#