Fix image creation.
authorRonan Le Martret <ronan@fridu.net>
Wed, 16 Jul 2014 11:31:56 +0000 (13:31 +0200)
committerRonan Le Martret <ronan@fridu.net>
Wed, 16 Jul 2014 11:31:56 +0000 (13:31 +0200)
Change-Id: I965ab6b4d493437ca8d514f7a1714560737d92e8
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
conf/layer.conf
recipes-image/config-image/config-image.bb
recipes-image/images/tizen-common-core-image-minimal.bb
recipes-tizen/aul-1/aul-1-extraconf.inc

index ad4f8ed..9d0ffda 100644 (file)
@@ -22,7 +22,6 @@ IMAGE_ROOTFS_SIZE_ext3 = "262144"
 
 PREFERRED_PROVIDER_rpmbuild = "rpm-native"
 PREFERRED_PROVIDER_libpam = "pam"
-PREFERRED_VERSION_libpam = "git"
 PREFERRED_VERSION_pam = "git"
 
 DEPENDS_remove =  "rpmresolve-native"
index 8d51465..b04051c 100644 (file)
@@ -12,6 +12,33 @@ do_install() {
   touch ${D}${sysconfdir}/environment
   chmod 0644 ${D}${sysconfdir}/environment
   
+  mkdir -p ${D}${localstatedir}
+  ln -s ${localstatedir}/volatile/log  ${D}${localstatedir}/log
+  
+  mkdir -p ${D}${sysconfdir}/profile.d
+cat >${D}${sysconfdir}/profile.d/bash_prompt_custom.sh <<'EOF'
+    # set a fancy prompt (overwrite the one in /etc/profile)
+    default="\[\e[0m\]"
+    usercol='\[\e[1;34m\]' # blue
+    hostcol='\[\e[1;32m\]' # green
+    pathcol='\[\e[1;33m\]' # yellow
+    gitcol='\[\e[1;31m\]' # light red
+    termcmd=''
+    _p="$";
+
+    if [ "`id -u`" -eq 0 ]; then
+        usercol='\[\e[1;31m\]'
+        _p="#"
+    fi
+
+    PS1="${usercol}\u${default}@${hostcol}\h${default}:${pathcol}\w${default}${gitcol}${default}${_p} ${termcmd}"
+
+    alias ll="ls -lZ"
+    alias lr="ls -ltrZ"
+    alias la="ls -alZ"
+
+EOF
+  
 }
 
 pkg_postinst_${PN} () {
@@ -22,7 +49,18 @@ pkg_postinst_${PN} () {
   chsmack -t $D${localstatedir}/volatile/log
   chsmack -a 'System::Log'  $D${localstatedir}/volatile/log
 
+  touch $D${localstatedir}/volatile/log/lastlog
+  touch $D${localstatedir}/volatile/log/faillog
+  touch $D${localstatedir}/volatile/log/wtmp
+  touch $D${localstatedir}/volatile/log/btmp
+  
+  mkdir -p $D${sysconfdir}/profile.d
+
+  
 }
 
 FILES_${PN} = "${sysconfdir}/tizen \
-               ${sysconfdir}/environment "
\ No newline at end of file
+               ${sysconfdir}/environment \
+               ${localstatedir}/log \
+               ${sysconfdir}/profile.d/bash_prompt_custom.sh \
+               "
\ No newline at end of file
index fea8c74..ce3bdff 100644 (file)
@@ -27,5 +27,7 @@ CORE_IMAGE_BASE_INSTALL += "desktop-skin"
 CORE_IMAGE_BASE_INSTALL += "rpm-security-plugin"
 CORE_IMAGE_BASE_INSTALL += "config-image"
 CORE_IMAGE_BASE_INSTALL += "kernel-modules"
+CORE_IMAGE_BASE_INSTALL += "less"
+CORE_IMAGE_BASE_INSTALL += "bash"
 
 export SYSROOT = "${IMAGE_ROOTFS}"
index f4423b2..a6b3995 100644 (file)
@@ -36,5 +36,5 @@ DEPENDS += "vconf"
 DEPENDS += "privacy-manager"
 
 do_configure_prepend() {
-    sed -i 's!/usr/bin/mkdir -m!/bin/mkdir -p -m!g' ${S}/packaging/ac.service
+    sed -i 's!/usr/bin/mkdir -p!/bin/mkdir -p!g' ${S}/packaging/ac.service
 }
\ No newline at end of file