[ostree] gnomeos: Move /etc/passwd to /var/passwd
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] gnomeos: Move /etc/passwd to /var/passwd
- Date: Wed, 25 Jan 2012 17:36:31 +0000 (UTC)
commit 5b00c108bf9cb24155c1f1253686a6c2b099b238
Author: Colin Walters <walters verbum org>
Date: Tue Jan 24 21:13:00 2012 -0500
gnomeos: Move /etc/passwd to /var/passwd
This makes "adduser" etc. work without significant modification, and
in general I think is in line with "OS-version indepedent data only
modifiable by programs" so it should be in /var.
gnomeos/yocto/classes/gnomeos-contents.bbclass | 18 ++++++------------
gnomeos/yocto/gnomeos-run.sh | 11 +++++++++++
2 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/gnomeos/yocto/classes/gnomeos-contents.bbclass b/gnomeos/yocto/classes/gnomeos-contents.bbclass
index b510634..0f6a0df 100644
--- a/gnomeos/yocto/classes/gnomeos-contents.bbclass
+++ b/gnomeos/yocto/classes/gnomeos-contents.bbclass
@@ -85,18 +85,12 @@ EOF
ln -sf /var/run/resolv.conf ${IMAGE_ROOTFS}/etc/resolv.conf
- # Override base-passwd...it has lots of crap in it we don't
- # want, and we do want dbus/gdm etc.
- cat >${IMAGE_ROOTFS}/etc/passwd << EOF
-root::0:0:root:/:/bin/sh
-dbus:*:1:1:dbus:/:/bin/false
-gdm:*:2:2:gdm:/var/lib/gdm:/bin/false
-EOF
- cat >${IMAGE_ROOTFS}/etc/group << EOF
-root:*:0:root
-dbus:*:1:
-gdm:*:2:
-EOF
+ # The passwd database is stored in /var.
+ rm -f ${IMAGE_ROOTFS}/etc/passwd ${IMAGE_ROOTFS}/etc/shadow ${IMAGE_ROOTFS}/etc/shadow-
+ ln -s /var/passwd ${IMAGE_ROOTFS}/etc/passwd
+ rm -f ${IMAGE_ROOTFS}/etc/group
+ ln -s /var/group ${IMAGE_ROOTFS}/etc/group
+
mkdir ${IMAGE_ROOTFS}/var/lib/gdm
chown 2:2 ${IMAGE_ROOTFS}/var/lib/gdm
diff --git a/gnomeos/yocto/gnomeos-run.sh b/gnomeos/yocto/gnomeos-run.sh
index 0977aab..7e0ec4d 100755
--- a/gnomeos/yocto/gnomeos-run.sh
+++ b/gnomeos/yocto/gnomeos-run.sh
@@ -74,6 +74,17 @@ if ! test -d ostree; then
mkdir ostree/repo
ostree --repo=ostree/repo init
fi
+cat >ostree/var/passwd << EOF
+root::0:0:root:/:/bin/sh
+dbus:*:1:1:dbus:/:/bin/false
+gdm:*:2:2:gdm:/var/lib/gdm:/bin/false
+EOF
+cat >ostree/var/group << EOF
+root:*:0:root
+dbus:*:1:
+gdm:*:2:
+EOF
+
cd ostree
ostree --repo=${OSTREE_REPO} local-clone repo ${BRANCH_PREFIX}runtime ${BRANCH_PREFIX}devel
for branch in runtime devel; do
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]