]> git.proxmox.com Git - mirror_lxc.git/blobdiff - templates/lxc-plamo.in
Merge pull request #2055 from marcosps/cgfsng_debug
[mirror_lxc.git] / templates / lxc-plamo.in
index 009fa4f861e20c51b4192df14eb737460fab5e6c..ec442ec3ab12210d59ad08ab1f4b16c32b4b2ee0 100644 (file)
@@ -186,10 +186,8 @@ configure_plamo() {
   # glibc configure
   mv $rootfs/etc/ld.so.conf{.new,}
   chroot $rootfs ldconfig
-  # root password
-  echo "Setting root password to 'root'..."
-  echo "root:root" | chroot $rootfs chpasswd
-  echo "Please change root password!"
+
+  # delete unnecessary process from rc.S
   ed - $rootfs/etc/rc.d/rc.S <<- "EOF"
        /^mount -w -n -t proc/;/^mkdir \/dev\/shm/-1d
        /^mknod \/dev\/null/;/^# Clean \/etc\/mtab/-2d
@@ -197,13 +195,22 @@ configure_plamo() {
        /^# Check the integrity/;/^# Clean up temporary/-1d
        w
        EOF
-  # /etc/rc.d/rc.M
+
+  # delete unnecessary process from rc.M
   ed - $rootfs/etc/rc.d/rc.M <<- "EOF"
        /^# Screen blanks/;/^# Initialize ip6tables/-1d
        /^# Initialize sysctl/;/^echo "Starting services/-1d
        /^sync/;/^# All done/-1d
        w
        EOF
+
+  # delete unnecessary process from rc.6
+  ed - $rootfs/etc/rc.d/rc.6 <<- "EOF"
+       /^# Save system time/;/^# Unmount any remote filesystems/-1d
+       /^# Turn off swap/;/^# See if this is a powerfail situation/-1d
+       w
+       EOF
+
   # /etc/rc.d/rc.inet1.tradnet
   head -n-93 $rootfs/sbin/netconfig.tradnet > /tmp/netconfig.rconly
   cat <<- EOF >> /tmp/netconfig.rconly
@@ -236,7 +243,7 @@ configure_plamo() {
 copy_configuration() {
   ret=0
   cat <<- EOF >> $path/config || let ret++
-       lxc.utsname = $name
+       lxc.uts.name = $name
        lxc.arch = $arch
        EOF
   if [ -f "@LXCTEMPLATECONFIG@/plamo.common.conf" ] ; then
@@ -349,8 +356,8 @@ ptcache=$cache/partial-${prog##*-}-$release-$arch
 dlcache=$cache/cache-${prog##*-}-$release-$arch
 rtcache=$cache/rootfs-${prog##*-}-$release-$arch
 if [ -z "$rootfs" ] ; then
-  if grep -q "^lxc.rootfs" $path/config ; then
-    rootfs=`awk -F= '/^lxc.rootfs =/{ print $2 }' $path/config`
+  if grep -q "^lxc.rootfs.path" $path/config ; then
+    rootfs=`awk -F= '/^lxc.rootfs.path =/{ print $2 }' $path/config`
   else
     rootfs=$path/rootfs
   fi