summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-09-24 00:53:55 +0000
committerJay Freeman <saurik@saurik.com>2008-09-24 00:53:55 +0000
commitfd350eb73d39cd295e544417c4c1b7c7a8d26627 (patch)
tree24b7a094683660f9db324988121fea410f7c8e6b
parent8f0c8cd5bae73e1f7b83a46e74a6bc8b29fed626 (diff)
Added a bunch more tools and almost got chpass working... stupid libutil.
git-svn-id: http://svn.telesphoreo.org/trunk@485 514c082c-b64e-11dc-b46d-3d985efe055d
-rw-r--r--data/system-cmds/chpass.diff47
-rw-r--r--data/system-cmds/make.sh14
2 files changed, 57 insertions, 4 deletions
diff --git a/data/system-cmds/chpass.diff b/data/system-cmds/chpass.diff
new file mode 100644
index 000000000..5f3e0e405
--- /dev/null
+++ b/data/system-cmds/chpass.diff
@@ -0,0 +1,47 @@
+diff -ru system_cmds-431/chpass.tproj/chpass.c system_cmds-431+iPhone/chpass.tproj/chpass.c
+--- system_cmds-431/chpass.tproj/chpass.c 2007-01-17 03:04:42.000000000 +0000
++++ system_cmds-431+iPhone/chpass.tproj/chpass.c 2008-09-24 00:22:49.000000000 +0000
+@@ -94,7 +94,6 @@
+ #endif
+
+ #ifndef OPEN_DIRECTORY
+-#include <pw_scan.h>
+ #include <libutil.h>
+ #endif
+
+@@ -312,7 +311,7 @@
+ #else
+ pw = &lpw;
+ old_pw = NULL;
+- if (!__pw_scan(arg, pw, _PWSCAN_WARN|_PWSCAN_MASTER))
++ if (!__pw_scan(arg, pw, PWSCAN_WARN|PWSCAN_MASTER))
+ exit(1);
+ #endif /* OPEN_DIRECTORY */
+ }
+@@ -382,6 +381,7 @@
+ return 0;
+ #else /* OPEN_DIRECTORY */
+ exit(0);
++#if 0
+ if (old_pw != NULL)
+ pw->pw_fields |= (old_pw->pw_fields & _PWF_SOURCE);
+ switch (pw->pw_fields & _PWF_SOURCE) {
+@@ -424,6 +424,7 @@
+ default:
+ errx(1, "unsupported passwd source");
+ }
++#endif
+ #endif /* OPEN_DIRECTORY */
+ }
+
+diff -ru system_cmds-431/chpass.tproj/edit.c system_cmds-431+iPhone/chpass.tproj/edit.c
+--- system_cmds-431/chpass.tproj/edit.c 2006-12-18 02:56:48.000000000 +0000
++++ system_cmds-431+iPhone/chpass.tproj/edit.c 2008-09-24 00:23:00.000000000 +0000
+@@ -85,7 +85,6 @@
+ #include <unistd.h>
+
+ #ifndef OPEN_DIRECTORY
+-#include <pw_scan.h>
+ #include <libutil.h>
+ #endif
+
diff --git a/data/system-cmds/make.sh b/data/system-cmds/make.sh
index e9e3ea017..8bc38359b 100644
--- a/data/system-cmds/make.sh
+++ b/data/system-cmds/make.sh
@@ -8,12 +8,13 @@ done
cd ..
${PKG_TARG}-gcc -o passwd passwd.tproj/!(od_passwd).c -I. -DTARGET_OS_EMBEDDED
-${PKG_TARG}-gcc -o chpass chpass.tproj/*.c -I. -Ipwd_mkdb.tproj -Ivipw.tproj
+# XXX: ${PKG_TARG}-gcc -o chpass chpass.tproj/*.c -I. -Ipwd_mkdb.tproj -Ivipw.tproj
${PKG_TARG}-gcc -o dmesg dmesg.tproj/*.c -I.
+${PKG_TARG}-gcc -o arch arch.tproj/*.m -I. -framework CoreFoundation -framework Foundation -lobjc
cp -va "${PKG_DATA}"/kextmanager* .
# XXX: shutdown
-for tproj in getconf getty hostinfo iostat login nvram reboot sync sysctl vipw zprint; do
+for tproj in ac accton getconf getty hostinfo iostat login mkfile nvram reboot sync sysctl update vifs vipw zdump zic zprint; do
cflags=
case ${tproj} in (shutdown)
@@ -28,10 +29,15 @@ chmod u+s passwd login
pkg: mkdir -p /bin /sbin /usr/bin /usr/sbin
+pkg: cp -a nologin.tproj/nologin.sh /sbin/nologin
+pkg: cp -a pagesize.tproj/pagesize.sh /usr/bin/pagesize
+pkg: chmod 755 /sbin/nologin /usr/bin/pagesize
+
pkg: cp -a sync /bin
pkg: cp -a reboot dmesg /sbin
pkg: ln -s reboot /sbin/halt
-pkg: cp -a chpass passwd zprint getty getconf hostinfo login /usr/bin
+pkg: cp -a arch getconf getty hostinfo login passwd zprint /usr/bin
pkg: ln -s chpass /usr/bin/chfn
pkg: ln -s chpass /usr/bin/chsh
-pkg: cp -a sysctl nvram vipw iostat /usr/sbin
+pkg: ln -s less /usr/bin/more
+pkg: cp -a ac accton iostat mkfile nvram sysctl update vifs vipw zdump zic /usr/sbin